I have a SQL Bulk copy function which has following code to create a bulk copy instance.
SqlBulkCopy bulkCopy = new SqlBulkCopy((SqlConnection) WorkConnection,
SqlBulkCopyOptions.FireTriggers, (SqlTransaction) WorkTransaction);
"WorkTransaction" is an external transaction. What will happen to it
- If we use "using" block around the SqlBulkCopy. Will it dispose this external transaction ?
- If we call close function ( "bulkCopy.Close();"), will it commit/dispose external transaction ?
Any help would be appreciated!
Thanks