Difference between revisions of "CHANGE()"

From Recital Documentation Wiki
Jump to: navigation, search
(Class)
 
Line 1: Line 1:
 
 
 
==Purpose==
 
==Purpose==
 
Determine whether a record has been updated since it was last read
 
Determine whether a record has been updated since it was last read
Line 35: Line 33:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Manual Locking]]
 
[[Category:Manual Locking]]
 
[[Category:Manual Locking Functions]]
 
[[Category:Manual Locking Functions]]

Latest revision as of 16:04, 27 November 2009

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 Server, Recital