This project has moved. For the latest updates, please go here.
2
Vote

Transactions are ignored during Bulk Insert

description

I found this by reading the code. Maybe I'm wrong with this, but I don't think so.

This bug is not part of the latest Release x.0.8 but was introduced in with commit 29721 in may 2014!

In BulkInsertExtension.cs the BulkInsert() method overload taking a transaction is ignoring this transaction at all.

As far as I understand this code it is very dangerous since the BulkInsert() will run outside any transaction and will be commited to the database even if I rollback the transaction.

Sorry, since I only read the code online and cant install a dev system to test this code, I will not provide a patch.

comments

ruudlenders wrote Feb 26, 2016 at 9:41 PM

I think I just encountered this. I got an error on a second bulk insert inside a transaction, so my transaction was never committed but the first bulk insert's records got into the database anyway.

kabu wrote Apr 8, 2016 at 9:42 AM

Use standard TransactionScope - according to my knowledgy it is working correct with this.

vendi_naren wrote Feb 3 at 9:06 AM

Hi,

Any idea, how can we use standard Transaction scope in bulk insert. Any examples are greatly appreciated.

Thanks
-Naren