I have a DataTable that I want to push to the DB. I want to be able to say like
myDataTable.update();
But after reading the MSDN docs, apparently this does inserts row by row.
It should be noted that these statements are not performed as a batch process; each row is updated individually.
What are my alternatives?
Edit: I am using SQL Server 2005
If using SQL Server,
SqlBulkCopy.WriteToServer(DataTable)Or also with SQL Server, you can write it to a .csv and use
BULK INSERTIf using MySQL, you could write it to a .csv and use
LOAD DATA INFILEIf using Oracle, you can use the array binding feature of ODP.NET
If SQLite: