Link to home
Start Free TrialLog in
Avatar of messageforums
messageforums

asked on

csv and oledb ?



hi

I want to load from a csv file, all the data to a dataset using oledb connection.

when i use:

string strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\;Extended Properties=text;";

OleDbDataAdapter oleCmd = new OleDbDataAdapter("SELECT * FROM NEWTESTApr.csv", strConn);

my code runs fine, but when i add either HDR, or FMT to the string connection like:

string strConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\;Extended Properties=text;HDR=No;FMT=Delimited;";
         
it gives me an exception : could not find installable ISAM.

can anyone throw more light on this .. why this is happening ?


thanks
messageman
Avatar of gregasm
gregasm

Hey messageman,

Have a look here. This might shed some light on the issue:

http://www.dotnet247.com/247reference/msgs/12/61447.aspx
Avatar of messageforums

ASKER

hi

thanks for the link and the topic on ISAM. that was very helpful.

I did not modify any registries yet, but my question is that
if it runs for the first command that i give., then the addition of HDR or FMT should not matter as long as the connection is valid.

but why just by the addition of those will the system give errors ????


please let me know
messageman
ASKER CERTIFIED SOLUTION
Avatar of gregasm
gregasm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial