Open GoogleCodeExporter opened 9 years ago
Disregard my issue.
Leaving it to a new transaction (i.e. passing null) might be better if you're
doing a BulkInsert while you're within a transaction
Original comment by sportfr...@gmail.com
on 18 Mar 2011 at 10:29
dont disregard it... is actually an issue, MSDN states " if you do not specify
a SqlTransaction object and pass a null reference, and the connection has an
active transaction, an exception is thrown"
(http://msdn.microsoft.com/en-us/library/tchktcdk.aspx)
first correction work fine:
var bulkCopy = new SqlBulkCopy((SqlConnection)transaction.Connection,
SqlBulkCopyOptions.TableLock, (SqlTransaction)transaction);
thanks
mvega
Original comment by mauv...@gmail.com
on 15 Apr 2011 at 10:13
Original issue reported on code.google.com by
sportfr...@gmail.com
on 10 Mar 2011 at 3:15