TRANSACTION
Starts an explicit transaction.
Syntax
TRANSACTION [READ]
Parameters
READ | This option is ignored. |
Comments
TRANSACTION marks the start of a sequence of commands that are to be handled as a single transaction. The transaction can be terminated either with an ENDTRANSACTION or with a QUITTRANSACTION command.
TRANSACTION sets the system variable $InTransaction to $True.
Example
form set accelerator Return Escape
while
form open fEmpForm
form display input
if Event.EventName <> “Escape”
find Departments where Departments.Dno=fEmpForm.Dno
if $setcount = 0
form open fDeptForm
form display input
endif
transaction
if $setcount = 0
add Departments from fDeptForm
endif
add Employees from fEmpForm
endtransaction
else
return
endif
endwhile