WebSpeed
Developer’s Guide


Subtransactions

A subtransaction is started when a database transaction is already active and WebSpeed encounters a subtransaction block. If an error occurs during a subtransaction, all the work done since the beginning of the subtransaction is undone. Subtransactions can be nested within other subtransactions.

The following are subtransaction blocks:

Table 9–1 shows when database transactions and subtransactions are started.

Table 9–1: Starting Database Transactions and Subtransactions 

Type of Block
Transaction Not Active
Transaction
Active
DO transaction

FOR EACH transaction

REPEAT transaction

Any DO ON ENDKEY, DO ON ERROR, FOR EACH,
REPEAT, or procedure block that directly contains statements that modify database fields or records or that read records using an EXCLUSIVE-LOCK.
Starts a transaction
Starts a subtransaction
Any FOR EACH, REPEAT, or procedure block that does not directly contain statements that either modify the database or read records using an EXCLUSIVE-LOCK.
Does not start a subtransaction or a transaction
Starts a subtransaction

Note that data handling statements that cause WebSpeed to automatically start a transaction for a database table do not cause WebSpeed to automatically start a transaction for a work table or temporary table.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095