B
Brian Shannon
I posted this question on Friday and haven't received a response. If I need
to add more content for clarification please ask:
My current solution works but I am looking to find if there is a more
efficient way of inserting multiple records from a data table to a DB.
I create a datatable tostore information in as my program is running. When
the program is finished I have about 20 records in the datatable.
I now need to insert these records into an sql2000 DB. I loop through the
table to insert 1 record at a time using the sqlcommand ExecuteNonQuery().
Is there a way to insert all the records from a datatable in 1 statement
to the DB? Here I am making 20 calls the my DB inserting 1 record at a
time. Hopefully there is a more efficient way.
If you need more info or more clarification please ask!
Thanks
to add more content for clarification please ask:
My current solution works but I am looking to find if there is a more
efficient way of inserting multiple records from a data table to a DB.
I create a datatable tostore information in as my program is running. When
the program is finished I have about 20 records in the datatable.
I now need to insert these records into an sql2000 DB. I loop through the
table to insert 1 record at a time using the sqlcommand ExecuteNonQuery().
Is there a way to insert all the records from a datatable in 1 statement
to the DB? Here I am making 20 calls the my DB inserting 1 record at a
time. Hopefully there is a more efficient way.
If you need more info or more clarification please ask!
Thanks