Tank Level: Scholar
 Registered: 30-09-2004 Posts: 41
|
Best CSV Open Method?
Hi All
My application needs to read in csv files from time to time. the number of records/rows can be from 1 to about 3000.
I am currently using ADO Connection, using the open method as...
cn.Open "Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=" & sFilePath & ";Extensions=csv,txt"
Problem is that sometimes the first line in the file is not being read, and sometimes it is!?!
Once the recset is created I move though each record and check that all fields are correct and then call a DTS package to import the data. There can be 12 different tables that data can be imported into, but only one at a time.
Am I doing somthing wrong, or using the wrong type of CSV file connection?
Any help would be very much appreciated.
Regards
Tank
|