COMPLETED()

From Recital Documentation Wiki
Revision as of 14:01, 2 June 2009 by Yvonnemilne (Talk | contribs)

Jump to: navigation, search

Class

Transaction Processing


Purpose

Function to determine whether an error occurred during a multi-statement transaction


Syntax

COMPLETED()


See Also

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


Description

The COMPLETED() function returns .T. if no errors occurred during processing of any command issued between the BEGIN TRANSACTION and END TRANSACTION commands.


Example

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


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer