views:

157

answers:

2

Dear guys

I want to import a typed DataSet with DataTables (not with TableAdapters) to my SQL Server database. The structure of all DataTables in the DataSet is the same like in the SQL Server database. With the same fields.

How can I import the whole typed DataSet to my SQL Server database?

Best regards

+1  A: 

Can you use the SqlDataAdapter's Update method?

RandomNoob
+1  A: 

If you're just inserting data, and want the quickest way to insert data in to SQL Server, use the SqlBulkCopy class.

One of the WriteToServer overloads of that class accepts a DataTable as a source of data to be bulk loaded into the underlying table.

AdaTheDev