tags:

views:

68

answers:

2

When I rollback a transaction it rollbacked only update and insert operations, but delete operations are not rollbacked, I want to know the reason?

I am using insert, update and delete operations under one SQL transaction

+1  A: 

That doesn't sound correct. Examine your code and make sure that you are doing everything correctly or paste the important parts here.

uriDium
A: 

All your CRUD operations on the same transaction should be rolled back. Period. Have you double-checked that you are using the transaction? It is impossible to diagnose just from your description; but believe me: somebody would have noticed before now...

Such things become a lot easier with TransactionScope, where enlisting is automatic.

Marc Gravell
@Marc: provided you don't have a firewall between you and the database which interferes with distributed transactions... ;)
David M
You can configure the firewall, though; DTCPing is good for diagnosing this.
Marc Gravell