Insert all rows from datatable to database

Y

ypul

How can Ido this ?

I have a datatable/ dataset, which has rows with data in it.
I want to bulk insert all rows from the dataset to database table (having
same table structure).
what is the best way, with out looping through everyrow and inserting into
database.

Thanks
 
O

Otis Mukinfus

How can Ido this ?

I have a datatable/ dataset, which has rows with data in it.
I want to bulk insert all rows from the dataset to database table (having
same table structure).
what is the best way, with out looping through everyrow and inserting into
database.

Thanks

INSERT INTO destination (col1, col2)
SELECT col1, col2
FROM source

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
 
Y

ypul

w.r.t what you have written , my source is dataset and my destination is a
database.
How can I write a query ?
if u can please give a sample code,

Thanks
 

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

Top