> Can ado.net 1.1 support nested transactions? I would like to > have the ability to rollback all changes at the end but also > have a start and commit trans in the loop. Note: this is not > the exact logic but a simple example to demonstrate what I > want to accomplish so please don't ask why because that's too > hard to explain. > > IE > Start trans > > begin loop > start trans > do work > commit trans > end loop > commit trans (or rollback depending on business rule)
No, ADO.NET supports single transactions, not nested transactions. This is because ado.net uses the used RDBMS' transaction code, so on sqlserver it will execute a BEGIN TRANS name.. You can simulate nested transactions by using a savepoint, using SaveTransaction on the connection. Not all ado.net connection classes support this, though most do. (Access doesn't for example). Frans =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com