Category - SqlBulkCopy
Results 1 - 5 of 7
Here Mudassar Ahmed Khan has explained with an example, how to solve the following error (exception) that occurs in the WriteToServer function when SqlBulkCopy is used along with SqlTransaction class.
System.InvalidOperationException: Unexpected existing transaction.
Here Mudassar Ahmed Khan has explained with an example, how to use SqlBulkCopy to insert bulk data to database with Transaction i.e. Commit and Rollback feature in ASP.Net using C# and VB.Net.
SqlBulkCopy will be used along with the SqlTransaction class in order to perform Bulk Insert with Transaction i.e. Commit and Rollback feature in ASP.Net.
Here Mudassar Ahmed Khan has explained how to bulk copy data from DataTable (DataSet) to SQL Server database Table using SqlBulkCopy in C#, VB.Net and ASP.Net.
Here Mudassar Ahmed Khan has explained how to perform Bulk Insert records and Update existing rows if record exists using C# and VB.Net.

SqlBulkCopy as the name suggest is for copying (inserting) bulk records and it cannot perform update operation. Hence comes Table Valued Parameter to the rescue, which allows us to pass multiple records using a DataTable to a Stored Procedure where we can do the processing.
Here Mudassar Ahmed Khan has explained how to import / upload CSV file data to SQL Server database in ASP.Net using C# and VB.Net.

The CSV file data will be inserted into SQL Server database table using the SqlBulkCopy class.
Results 1 - 5 of 7