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.