Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

Part Number B10118-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

Rollback Method

See Also
Example
Applies To

OraConnection

OraDatabase

OraSession

Description

Ends the current transaction and rolls back all pending changes to the database.

Usage

oraconnection.Rollback

orasession.Rollback

oradatabase.Rollback

Remarks

When this method is invoked, all OraDynaset objects that share the specified session or connection are given the opportunity to cancel the rollback request. If they do not cancel the request, they are then advised when the rollback succeeds.

This feature is useful primarily for dynasets that are created as part of an Oracle Data Control's operation. For such dynasets, the Validate event is sent to allow them to cancel the rollback request.

OraConnection, OraDatabase: Rollback rolls back all pending transactions within the specified connection. This method has no effect if a transaction has not begun. When a session-wide transaction is in progress, you can use this call to prematurely roll back the transactions for the specified connection.

OraSession: Rollback rolls back all pending transactions within the specified session. Rollback is valid only when a transaction has been started. If a transaction has not been started, use of Rollback results in an error.

Note: If an OraDatabase object has been enlisted with Microsoft Transaction Server (MTS) and is part of a global MTS transaction, this method has no effect.