A few hints before we start,
cnStr="Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & sPath + ";" & _ "Extended Properties='text;HDR=YES;FMT=CSVDelimited;'; " cnStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDir;Extended Properties='text;HDR=YES;FMT=CSVDelimited;'; "
As an alternative, you can specify a "schema.ini" file. But, that is waaaaaaaaay beyond what I'm trying to accomplish here... (Good luck)
|Provider||Name of provider. Since ADO.NET doesn't have one inherantly, use OleDB.||Microsoft.Jet.OLEDB.4.0|
|FMT||File is "formatted" using a specific style or delimiter||
Each field of the file is "delimited". The default is a comma (,)
Each field of the file is "delimited" by the value within the parentheses. Example of using a pipe charater: Delimited(|).
Each record/row in he file is formatted using QUOTED/Comma separated values.
Ex: "Bob","Johnson","123 anystreet"
Each field in each record of the file is separated by a TAB character.
||The first row in the file is the "Header". It contains the names of the fields/columns
YES It DOES have a header row
NO It does NOT have a header row