Macromedia coldfusion 4.5-cfml language reference ユーザーズマニュアル

ページ / 608
220
CFML Language Reference 
CFTRANSACTION
Use CFTRANSACTION to group multiple queries into a single unit. CFTRANSACTION 
also provides commit and rollback processing. See Usage for details.
Syntax
<CFTRANSACTION 
ACTION="BEGIN" or "COMMIT" or "ROLLBACK"
ISOLATION="Read_Uncommitted" or
 "Read_Committed" 
or
 "Repeatable_Read" 
>
</CFTRANSACTION>
ACTION
Optional. The actions are as follows:
BEGIN, which indicates the start of the block of code to be executed. It is the 
default value.
COMMIT, which commits a pending transaction.
ROLLBACK, which rolls back a pending transaction.
ISOLATION
Optional. ODBC lock type. Valid entries are:
Read_Uncommitted
Read_Committed
Repeatable_Read
Serializable
Usage
A transaction block is created within these tags:
<CFTRANSACTION> 
queries to be executed
</CFTRANSACTION> 
Within the transaction block, you can commit a transaction by nesting the 
<CFTRANSACTION ACTION="COMMIT"/> tag or roll the transaction back by nesting 
the <CFTRANSACTION ACTION="ROLLBACK"/> tag within the block. 
Within one transaction block, you can write queries to more than one database; 
however, you must commit or rollback the transaction to a particular database prior to 
writing a query to another database.
By using CFML error handling, you have control over whether each transaction is to be 
committed based on the success or failure of the database query.
Use the ISOLATION attribute for additional control over how the database engine 
performs locking during the transaction.