613-518-1166 info@zimdatabases.com

ZIM Language Reference

TRANSACTION

< All Topics

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

 

See Also

BEGIN WORK

ON

QUITTRANSACTION

SET TRANSACTION FLOW

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Table of Contents