Compartir a través de


Nest Transactions Sample

File: ...\Samples\Solution\Db\transact.scx

This sample illustrates beginning, ending, and rolling back transactions. You can decide to commit or discard changes to a single table when you use table buffering, but you can decide to commit or discard changes to any number of tables when you use transactions.

Before editing either table, click the Begin button. After editing, you can click Begin again to nest another transaction, or you can click End to commit your edits to the table or Rollback to discard your changes.

The key commands in this example are as follows:

BEGIN TRANSACTION

END TRANSACTION

ROLLBACK

The function that returns the current number of nested transactions is as follows:

TXNLEVEL( )

See Also

Reference

BEGIN TRANSACTION Command

END TRANSACTION Command

ROLLBACK Command

TXNLEVEL( ) Function

Other Resources

Databases Solution Samples