|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Insert all rows from datatable to databaseHow 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 On Tue, 4 Apr 2006 11:35:58 +0100, "ypul" <y***@hotmail.com> wrote: INSERT INTO destination (col1, col2)>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 > 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 Show quote "Otis Mukinfus" <ph***@emailaddress.com> wrote in message news:6lm43219mqj0k75bfe1jh4tpmt6dll0ukh@4ax.com... > On Tue, 4 Apr 2006 11:35:58 +0100, "ypul" <y***@hotmail.com> wrote: > > >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 |
|||||||||||||||||||||||