ConnectionString for comma-delimited file

  • Thread starter Thread starter FireStarter
  • Start date Start date
F

FireStarter

Is there a way to connect through an OleDBConnection to a
comma-delimited file? Then I could read records through a DataReader.
I was thinking it could be done through the ExtendedProperties, but I
cannot find the right value for it (I would probably need to specify
field and row delimiters).


Thanks.
 
Unless you have a special reason for using OleDbConnection, create a
data source in ODBC using the Microsoft Text Driver. Then use
OdbcConnection instead of OleDbConnection.
 
Thank you, after a couple of changes to bring it to C# syntax, this
worked perfectly.
 
Thank you for the idea. I went with OleDB because I wanted the solution
to be portable on other comps w/o having to add ODBC sources. It would
have worked, though.
 
Back
Top