Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RaSQL/B 6.1a for Clipper - <b>n_xgather()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_XGATHER()
Move data from array to record in table

Syntax
N_XGATHER([<aNames>, ] <aData>)

Arguments
<aNames>  is a list of field names whose values you want RaSQL to replace 
with values from the corresponding elements in <aData>.

<aData> is the source array.

Remarks
If  you pass one array then RaSQL replaces each field with the value in the 
same-numbered array element. The number of fields gathered is the number of 
fields in the record, or the array size, which ever is less.

If  you pass two arrays,  RaSQL assumes that the first array contains the 
field names and the second array contains the values you want replaced into 
the corresponding field name in the record buffer.

N_XGATHER() does not write data out to disk. RaSQL does not write any data 
to disk until your program issues N_XUPDATE() or N_XINSERT().

Example
DECLARE data[2], names[2]
names[1] = 'last_name'
names[2] = 'first_name'
N_XSCATTER(names, data)     && Scatter two
 .                          && fields only
 .       && Edit data
 .
N_XGATHER(names, data)      && Gather same
                            && two fields
N_XUPDATE()


See Also: N_XSCATTER()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson