BEGIN TRANSACTION

Advantage SQL Engine

Begins a transaction on the server.

Syntax

BEGIN TRAN[SACTION]

Remarks

BEGIN TRANSACTION begins a transaction for the calling user. The transaction state is shared with the client, so a transaction cannot be started in SQL if one has already been started with an Advantage client (ie ACE API AdsBeginTransaction). However, once begun by either an Advantage client or through SQL, the transaction can be committed or rolledback by either an Advantage client or through SQL.

Note SQL transactions behave exactly like client transactions. Therefore, with Advantage Local Server, transactions are not supported, but are expected to be executed in a correct sequence.

Examples

BEGIN TRANSACTION

UPDATE sal SET salary = 35000.00 WHERE emp_id = 25089

COMMIT WORK

 

BEGIN TRAN

UPDATE sal SET salary = 20000 WHERE hire_date < '1992-02-14'

ROLLBACK WORK