Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_vstore() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_VSTORE()

 DESCRIPTION

 C_VSTORE() stores the values of the current record in the database
 to the public memory variables created by C_VPUBLIC().

 NOTES

 The C_VPUBLIC() function must be called first before any other
 ClipOn database memory variable function.

 SYNTAX

 C_VSTORE([prefix])

 PARAMETERS

 prefix (C) is the prefix string originally specified for C_VPUBLIC()
 when the public memory variables were created.  If prefix is not
 specified, the default of no prefix is used.

 RETURNS

 C_VSTORE() returns true (.T.) if all memory variables are
 successfully initialized, or false (.F.) if an error occurs.

 EXAMPLES

 && (Test.dbf has fields: name, addr, city, state, amount)
 use test            && Use test.dbf and add new records in a loop

 c_vpublic("M_")     && Create memory variables with "M_" prefix

 recd = 0
 do while .t.
   @ 1,1 say "Enter Record to Edit: " get recd picture "999999"
   read
   if lastkey() = 27
     exit
   endif
   go recd
   c_vstore("M_")            && Store database values to memory variables
   @ 1,1 say "Enter Name:    " get m_name
   @ 2,1 say "Enter Address: " get m_addr       && Allow data edits
   @ 3,1 say "Enter City:    " get m_city
   @ 4,1 say "Enter State:   " get m_state
   @ 5,1 say "Enter Amount:  " get m_amount picture "99,999.99"
   read
   c_vreplace("M_")    && Replace memory variables into database
 enddo
 c_vrelease("M_")      && Release public memory variables


See Also: C_VPUBLIC() C_VINIT() C_VREPLACE() C_VRELEASE()

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