0

I am wondering if there is a way to write a c# DataTable's data into an existing Microsoft SQL database table.

In my code, I have imported an Excel sheet into a DataTable. I would like to add the contents of the DataTable to an existing SQL table. Is there an easy way to do this?

I found this stack question (How to insert a data table into SQL Server database table?) that sort of touches on what I would like to do.

Or do I need to run the DataTable through a loop and insert each row of data through code?

Thanks in advance for your help.

Community
  • 1
  • 1
ThaKidd KG5ORD
  • 1,535
  • 3
  • 24
  • 38

0 Answers0