Difference between revisions of "REPLACE AUTOMEM"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Update fields with values stored in correspondingly named memory variables
 
Update fields with values stored in correspondingly named memory variables
 
  
 
==Syntax==
 
==Syntax==
 
REPLACE AUTOMEM
 
REPLACE AUTOMEM
 
  
 
==See Also==
 
==See Also==
[[CLEAR AUTOMEM]], [[GATHER]], [[READ]], [[SCATTER]], [[STORE AUTOMEM]], [[USE]]
+
[[CLEAR AUTOMEM]], [[GATHER]], [[SCATTER]], [[STORE AUTOMEM]], [[USE]]
 
+
  
 
==Description==
 
==Description==
 
The REPLACE AUTOMEM command updates fields in the current record of the active table.  It assumes the existence of memory variables that match the fields in terms of name, data type and size.  Such memory variables can be generated automatically using the STORE AUTOMEM or USE…AUTOMEM commands.
 
The REPLACE AUTOMEM command updates fields in the current record of the active table.  It assumes the existence of memory variables that match the fields in terms of name, data type and size.  Such memory variables can be generated automatically using the STORE AUTOMEM or USE…AUTOMEM commands.
 
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
set locktype to optimistic
+
use customers
use customer
+
 
store automem
 
store automem
@1,1 get m.name
+
//...
@2,1 get m.address
+
replace automem
@3,1 get m.state
+
read
+
if not change()
+
    replace automem
+
endif
+
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Memory Variables]]
 
[[Category:Memory Variables]]
 
[[Category:Memory Variables Commands]]
 
[[Category:Memory Variables Commands]]

Revision as of 07:51, 10 February 2012

Purpose

Update fields with values stored in correspondingly named memory variables

Syntax

REPLACE AUTOMEM

See Also

CLEAR AUTOMEM, GATHER, SCATTER, STORE AUTOMEM, USE

Description

The REPLACE AUTOMEM command updates fields in the current record of the active table. It assumes the existence of memory variables that match the fields in terms of name, data type and size. Such memory variables can be generated automatically using the STORE AUTOMEM or USE…AUTOMEM commands.

Example

use customers
store automem
//...
replace automem