transaction クラス : Rollback()メソッド
説明
トランザクションの開始以降に行われたすべてのデータ変更を消去します。
構文
instance.Rollback()
引数
無し。
返り値
無し。
サンプルコード
| 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(); // It erases changes. The database returns to the state as of #1. |
| 6: | tran.Release(); |
| 7: | cnn.Close(); |
注意
無し。
参照リンク
無し。


