connection class : BeginTransaction() method

Description

Begins a database transaction.

Syntax

instance.BeginTransaction()

Arguments

None.

Return value

ClassDescription
transactionTransaction.

Sample code

1:

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

2:

cnn.Open();

3:

transaction tran = cnn.BeginTransaction();

4:

... // Access to the database.

5:

tran.Commit(); // It confirms the database changes.

6:

tran.Release();

7:

cnn.Close();

Notes

None.

Links for reference

None.

Copyright © Cooker All rights reserved.