Insert all rows from datatable to database

  • Thread starter Thread starter ypul
  • Start date Start date
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
 
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
 
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
 
Back
Top