oledb and csv

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top