Rollback

Description

Rolls back all database changes since the last commit.

Applies to

Web ActiveX Transaction Object control

Syntax

void transaction.Rollback( )

Returns

None

Usage

If AutoCommit is set to true or 0, then transactions are committed immediately and calling the Rollback method has no effect.

Examples

Example 1

This example updates the database but rolls back the transaction if an error occurred:

dw_1.Update( );

if (trans_1.GetSQLCode( ) != 0) {

		trans_1.Rollback( );

}

See also