Home Notices Documents Classes Download Others Rice
Classes  >  transaction  >  RollBack()
transaction class : RollBack() method

Description

Erases all data changes made since the start of the transaction.

Syntax

transactionInstance.RollBack()

Arguments

None

Return value

None

Sample code

1:

connection cnn = new connection("Data Source=c:\somedirectory\somedatabase.sqlite3;Version=3;");

2:

cnn.Open();

3:

transaction tran = cnn.BeginTransaction(); // #1

4:

... // Access to the database.

5:

tran.RollBack(); // Erase changes. The database returns to the state at the time of #1.

6:

tran.Release();

7:

cnn.Close();

Notes

None

Links for reference

None

Copyright © Rice All rights reserved.