|
Web+ Tutorial
|
Lesson 6.7 - Transaction Processing
- Description
- An optional Provides database transaction processing. All queries contained within a
webDBTransaction tag are treated as a transactional unit. This means that changes to the database are not permanently committed til all queries in the transaction block have executed successfully. If an error occurs in one of the queries, all changes made by previous queries within the transaction block are rolled back.
- Syntax
<webDbTransaction [ISOLATION=IsolationSetting]></webDbTransaction>
- Agument
- /tutorial/argument/arg33.wml
- Example
<webDbTransaction><webDbQuery NAME="CashWithdraw" DataSource="Checking Accounts"SQL="Update Accounts Set Balance = Balance - #Amount# Where AccountID = '#AccountFrom#'"> <webDbQuery NAME="CashDeposit" DataSource="Checking Accounts"SQL="Update Accounts Set Balance = Balance + #Amount# Where AccountID = '#AccountTo#'"> </webDbTransaction>
- Exercise
- This example is for your reference. You can try it on your own system.
You can try out some Web+ code of your own here.
|
|