WebSpeed
Developer’s Guide


Controlling Where DB Transactions Begin and End

You might find that, because of the kind of work a procedure does, you want to start or end database transactions in locations other than those WebSpeed automatically chooses. You know that WebSpeed automatically starts a database transaction for each iteration of four kinds of blocks:

A database transaction ends at the end of the transaction block or when the transaction is backed out for any reason.

Sometimes you want a database transaction to be larger or smaller depending on the amount of work you want undone in the event of an error. You can explicitly tell WebSpeed to start a database transaction by using the TRANSACTION option with a DO, FOR EACH, or REPEAT block header:

When you explicitly tell WebSpeed to start a database transaction, it starts a transaction on each iteration of the block regardless of whether the block contains statements that directly update the database. Of course, WebSpeed does not start a database transaction if one is already active.


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