Insert from a DataTable

  • Thread starter Thread starter Jason Huang
  • Start date Start date
J

Jason Huang

Hi,

I have a DataTable dt, I wanna insert all records from dt to my SQL Server's
Database Table.
How would I do?
Thanks for help.


Jason
 
Hi,

I have a DataTable dt, I wanna insert all records from dt to my SQL Server's
Database Table.
How would I do?
Thanks for help.

Jason

Set the InsertCommand on a SqlDataAdapter and then call the Update
method. I'm assuming you're manually calling Rows.Add on the DataTable.
 
Back
Top