CHANGE()

From Recital Documentation Wiki
Revision as of 17:23, 23 March 2009 by Yvonnemilne (Talk | contribs)

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

Class

Manual Locking


Purpose

Determine whether a record has been updated since it was last read


Syntax

CHANGE()


See Also

GATHER, READ, REPLACE , SET LOCKTYPE


Description

The CHANGE() function can be used in conjunction with SET LOCKTYPE TO OPTIMISTIC to determine whether a record has been updated since it was last read. If the records has been updated by another process since it was last read, the CHANGE() function will return .T. (TRUE), otherwise it will return .F. (FALSE).


Example

set locktype to optimistic
use customer
store automem
@1,1 get m.name
@2,1 get m.address
@3,1 get m.state
read
if not change()
    replace customer.name with m.name,;
     customer.address with m.address,;
     customer.state with m.state
endif


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer