OB1Canobie
asked on
Parse CSV file into table using an array
I need some generic code in visual basic that will read a .CSV line by line using an Array, and inserting into a table using an SQL statement.
ASKER
Rob,
For some reason the code did not work, it never inserted the data into the table. I am giving more specific information. The file is named 060108 TRANSACTIONS.CSV. Of course the date will change each day. A header is on the first line and starts with TRANSACTIONS REPORT which will need to be removed. The field order is (TRANS DATE, ACCOUNT NO, LAST NAME, FIRST NAME, CURRENT FC, TRANS FC, FLAG, PTYPE, PAYMENT, ITEM NO, DESCRIPTION, CURRENT BALANCE) which will be inserted into a table called [TRANSACTIONS] and will have the same field names as the file. Thanks.
For some reason the code did not work, it never inserted the data into the table. I am giving more specific information. The file is named 060108 TRANSACTIONS.CSV. Of course the date will change each day. A header is on the first line and starts with TRANSACTIONS REPORT which will need to be removed. The field order is (TRANS DATE, ACCOUNT NO, LAST NAME, FIRST NAME, CURRENT FC, TRANS FC, FLAG, PTYPE, PAYMENT, ITEM NO, DESCRIPTION, CURRENT BALANCE) which will be inserted into a table called [TRANSACTIONS] and will have the same field names as the file. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Rob,
this works great. Thanks for your help. ; )
this works great. Thanks for your help. ; )
Oh great! So you've already got code to connect to the database.....that's good.... :- )
Regards,
Rob.
Regards,
Rob.
ASKER
Yes. Thanks for your great help.
Regards,
Rob.
Open in new window