HELP!!! VB.net BATCH INSERT

N

neilphan

Hi All,


I was wondering if there was a way to do a "batch insert", insert more
than 1 row at a time. I have an application that currently reads from
a file and insert each record 1 row at a time into the database....this

takes alot of time due to the number of records.


My basic question is there a way to do several inserts as "batch
inserts" at a time with one command, one connection, and one database
call?


In Java, I have performed these type's of "batch inserts/updates"
before, but not sure if MS dotNet has this feature in their ADO.net
framework


Your help would greatly be appreciated,


Thanks,
Neil
 
M

Marina

Define 'batch'.

You can string multiple sql insert statements together separated by a
semicolon and execute that in one round trip to the database.

If you are using the adapter objects, then there is no way in 1.1, however
2.0 has improvements in this area. I believe it allows batch statements and
bulk inserts.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top