Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Reference Index > Transaction Processing

Example

Scroll Prev Top Next More

Below is an example of a form being edited where committing a new customer to record is employed.

 
-- Transaction Mode Commit/Rollback

DISCONNECT

SET TRANSACT ON

SET AUTOCOMMIT OFF

CONNECT ConComp

 

CLEAR ALL VAR

SET VAR vTime TIME = .#TIME

 

INSERT INTO Customer LastUpdateTime VALUES (.vTime)

 

EDIT USING CustomerEdit WHERE LastUpdateTime=.vTime

 

DIALOG 'Is the Customer Information Being Saved to Record?' +

vYesNo vEndKey No CAPTION ' ' ICON QUESTION

 

IF vYesNo = 'YES' THEN

 COMMIT

ELSE

 ROLLBACK

ENDIF

RETURN