Unanswered: ADO skips first line of text data file
Using ADO to read a text data file, the recordset omits the first row of the text file every time.
File is a .dat file, tab delimited, no header row.
Got all my ducks in a row:
1) Write a schema.ini
2) Make sure the extension is not excluded in the Jet Text registry key
3) Setup the connection properly (per MSDN Scripting help)
Works nicely, except the fist line of data is missing. File contains 78 rows of data, Jet is skipping the first line every time and reporting 77 rows.
1) Adding a blank row, as suggested in this forum, is not an option - the data files are machine generated are not to be altered by other processes.
2) I could do it the old fashion way of importing and splitting into arrays, but this is a database function and ADO should be able to handle it.
I've seen the option to not import the first row of a data file before - generally because the file might contain column headers...
I suggest you google up on not importing column heads and work it backwards - at least, that's where I'd start
I think that if you have a schema file then your extended properties in your connection string are ignored. Dump the schema file and the HDR option should work fine. Of course, your import would fail though