ASE/CIS requires an access service to support particular aspects of the ASE transaction model. If the access service is configured correctly for ASE/CIS, and if it recognizes the ASE/CIS client application, it supports the transaction model. The model includes these statements:
begin tran
prepare tran
commit or rollback
This is a limited implementation of the ASE transaction model and is available only for ASE/CIS. Other applications cannot use these features.
To process ASE/CIS transactions, you must set the transaction mode and transform level parameters. For instructions, see the Adaptive Server Enterprise Component Integration Services Guide.
If all conditions are met, the transaction statements are handled as follows:
The access service:
Sets a flag so that it knows it is in an ASE/CIS transaction
Sets the transaction mode to long
Returns a successful status, as if a set command were executed
Other considerations are:
Nested transactions are not required nor are they supported.
ASE/CIS does not issue this statement if outstanding changes were not committed or rolled back.
The access service issues a commit prior to handling the statement.
If the access service is in an ASE/CIS transaction, it:
Ignores this statement
Returns a successful status, just as if a set command were executed
This statement is issued in preparation for a commit statement.
If the access service is in an ASE/CIS transaction, it:
Resets the flag that indicates it is in an ASE/CIS transaction
Resets the mode to short
Returns a success or failure status of the commit or rollback statement to ASE/CIS
ASE/CIS expects the access service to be in short transaction mode unless:
ASE/CIS opened one or more read-only cursors.
ASE/CIS issued a begin tran but did not issue a commit or rollback.
Because the access service automatically switches to long transaction mode when a cursor is declared or when a dynamic event prepare occurs, it backs out of this mode when the last cursor and prepared statement are deallocated and not in a begin tran block.
ASE/CIS always issues dynamic events within its own transaction, so it is not necessary to back out when the last dynamic statement is freed.
In the event of a rollback, the access service issues a commit and sets the transaction mode to short.