ROLLBACK()

From Recital Documentation Wiki
Revision as of 16:28, 20 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

ROLLBACK()

Class

Transaction Processing


Purpose

Function to verify success of a transaction rollback


Syntax

ROLLBACK()


See Also

SET ROLLBACK, BEGIN TRANSACTION, ISMARKED(), RESET IN, ROLLBACK, END TRANSACTION , COMPLETED()


Description

The ROLLBACK() function returns .T. if a rollback is successful and .F. if a rollback fails. This function is used in conjunction with the ROLLBACK command to determine if an attempted rollback and recovery was successful. Automatic rollback and recovery can be initiated within a BEGIN TRANSACTION … END TRANSACTION block with the SET ROLLBACK ON command.


Example

procedure recovery
rollback
if rollback()
dialog box "Rollback was ok"
else
dialog box "Rollback not completed"
endif
return
 
use masterfile
on error do recovery
begin transaction
delete first 15
replace all t1 with (t2*t3)/100
list
end transaction
if completed()
dialog box "Transaction completed"
else
dialog box "Errors occurred during transaction"
endif


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer