SqlCeConnection::BeginTransaction Method (IsolationLevel)

Begins a database transaction with the current IsolationLevel value.

Namespace:  System.Data.SqlServerCe
Assembly:  System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)

[SecurityTreatAsSafeAttribute]
[SecurityCriticalAttribute]
[SecurityPermissionAttribute(SecurityAction::Assert, UnmanagedCode = true)]
public:
SqlCeTransaction^ BeginTransaction(
	IsolationLevel isolationLevel
)

Parameters

isolationLevel
Type: System.Data::IsolationLevel
The transaction isolation level for this connection.

Return Value

Type: System.Data.SqlServerCe::SqlCeTransaction
An object representing the new transaction.

You must explicitly commit or roll back the transaction using the Commit or Rollback method.

The following example creates a SqlCeConnection and a SqlCeTransaction, and then demonstrates how to use the BeginTransaction, Commit, and Rollback methods.

No code example is currently available or this language may not be supported.
Show: