Inserting lot of data - Best practice

looc

Member
Joined
Jan 4, 2008
Messages
8
Programming Experience
Beginner
Hi
I need suggestions on how to insert a lot of data into a sql 2005 db.

Scenario is following:

I have a semicolon separated textfile and want to upadte a db-table.

i have two different methods that i use, but i dont like any of them:
1.
* Connect to db and execute a truncate table
* Make a .fmt file and then insert the textfile using dos command sql - bcp

2. Make a vb.net prog that connects to db, truncate table, read textfile and for each line execute a insert or a storedproc that inserts.

Anyone have a better method for this?

/bjorn
 
Back
Top