oledb and csv

  • Thread starter Thread starter messageman
  • Start date Start date
M

messageman

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.

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
exceptions????


please help
messageman
 
Back
Top