c# - Does SqlBulkCopy Enlist in Ambient Transaction? -


i can't seem find definitive answer on this. have sqlbulkcopy operation wrapped in transactionscope number of other operations.

i aware of overloads in sqlbulkcopy constructor allow passing sqltransaction object. assuming not passing transaction in constructor, command automatically participate in ambient transaction created transactionscope?

i've done testing, , appears sqlbulkcopy does, in fact, honor ambient transaction, @ least in .net 4.5.

to test, did sqlbulkcopy operation while debugging, , verified rows made database (via nolock/dirty read query). threw exception on next line of code, , allowed transactionscope roll back. verified rows no longer in database.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -