DB2®Transaction.SetSavePoint Method
Sets a transaction save point within a transaction.
- Namespace:
IBM.Data.DB2- Assembly:
IBM.Data.DB2(inIBM.Data.DB2.dll)
Syntax
[Visual Basic]
NotOverridable Public Sub SetSavePoint() Implements _
IDbTransaction.SetSavePoint
[C#]
public void SetSavePoint();
[C++]
public: __sealed void SetSavePoint();
[JScript]
public function SetSavePoint();
- Implements:
- DB2Transaction.SetSavePoint
Exceptions
| Exception type | Condition |
|---|---|
| DB2Exception | An error occurred since the save-point-name cannot begin with 'SYS'. |
| InvalidOperationException | An error occurred as there is no active transaction. |
| Exception | An error occurred as the save-point-name has been already defined. |
Remarks
The following public methods will be added to DB2Transaction class to support transaction Savepoint:
public void Rollback( String SavepointName )
public void ReleaseSavepoint( String SavepointName)
public void SetSavepoint(String SavepointName)
public void SetSavepoint(String SavepointName, bool Unique)
public void SetSavepoint(String SavepointName, bool Unique, bool RetainLocks)Applications
can call DB2Transaction.SetSavepoint overloaded method to set a transaction
save point within a transaction; save point name can be specified
by using the parameter SavepointName. The Boolean option RetainLocks can
be used to specify whether locks are to be retained or not. Unique
option specifies that the application does not intend to reuse this
savepoint name while the savepoint is active within the current savepoint
level. If savepoint-name already exists within this savepoint level,
an error is returned. Calling new Rollback method and passing NULL
value will rollback the most recently set savepoint within the current
savepoint level.