Reading file contents to database
Posted: Wed May 11, 2005 6:05 am
Hi All,
I want to take some data from a file (txt) and insert it into a database.
I have a rough idea how to open, read and get the contents of a basic comma delimited file, but I want to be able to read say 5 columns of data from one row and insert into 5 columns in the DB, then the same for the next row etc...
Each row should have the same number of columns, but the rows may vary.
EG
Name, value1, value2, value3
Name, value1, value2, value3
Can anybody give me a hand with this?
Many thanks,
Paul
I want to take some data from a file (txt) and insert it into a database.
I have a rough idea how to open, read and get the contents of a basic comma delimited file, but I want to be able to read say 5 columns of data from one row and insert into 5 columns in the DB, then the same for the next row etc...
Each row should have the same number of columns, but the rows may vary.
EG
Name, value1, value2, value3
Name, value1, value2, value3
Can anybody give me a hand with this?
Many thanks,
Paul