Difference between revisions of "SAVE DATASESSION"
From Recital Documentation Wiki
Barrymavin (Talk | contribs) (→Description) |
Yvonnemilne (Talk | contribs) |
||
(8 intermediate revisions by one user not shown) | |||
Line 13: | Line 13: | ||
The SAVE DATASESSION command is used to save the status of all open database tables. The SAVE DATASESSION command saves the following information pertaining to the current session for each open table: | The SAVE DATASESSION command is used to save the status of all open database tables. The SAVE DATASESSION command saves the following information pertaining to the current session for each open table: | ||
− | * Workarea number | + | * Currently selected cursor/workarea |
− | * | + | * Cursor/Workarea number |
− | * | + | * Database name |
− | + | * Full path of table | |
* Current record number | * Current record number | ||
− | * Current index order | + | * Current index tag order |
* Lock status | * Lock status | ||
* eof() status | * eof() status | ||
Line 24: | Line 24: | ||
* found() status | * found() status | ||
− | The RESTORE DATASESSION command may be used to restore the above information. | + | The [[RESTORE DATASESSION]] command may be used to restore the above information. SAVE and RESTORE DATASESSION can be used with Recital Web session variables ( _SESSION[ ] ) to maintain context between different .rsp web page requests. |
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | + | save datasession | |
− | + | close all | |
− | + | ||
− | + | // open up some new tables in a new datasession | |
− | + | ||
− | + | restore datasession | |
</code> | </code> | ||
+ | <code lang="recital"> | ||
+ | save datasession to statevar | ||
+ | _session[ "statevar" ] = statevar | ||
+ | |||
+ | // you can then restore the session on the next web page request like this | ||
+ | |||
+ | statevar = _session[ "statevar" ] | ||
+ | restore datasession from statevar | ||
+ | </code> | ||
==Products== | ==Products== | ||
− | Recital | + | Recital, Recital Web |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
[[Category:Screen Forms]] | [[Category:Screen Forms]] | ||
[[Category:Screen Forms Commands]] | [[Category:Screen Forms Commands]] |
Latest revision as of 11:21, 24 October 2016
Purpose
Save the status of the current data session
Syntax
SAVE DATASESSION [ TO <memvar>]
See Also
@...GET, CHANGE, EDIT, ON KEY, READ, REPLACE(), RESTORE RECORDVIEW, RESTORE DATASESSION, SET CLIPPER, SET KEY, SET PCKEYS, SKIP
Description
The SAVE DATASESSION command is used to save the status of all open database tables. The SAVE DATASESSION command saves the following information pertaining to the current session for each open table:
- Currently selected cursor/workarea
- Cursor/Workarea number
- Database name
- Full path of table
- Current record number
- Current index tag order
- Lock status
- eof() status
- bof() status
- found() status
The RESTORE DATASESSION command may be used to restore the above information. SAVE and RESTORE DATASESSION can be used with Recital Web session variables ( _SESSION[ ] ) to maintain context between different .rsp web page requests.
Example
save datasession close all // open up some new tables in a new datasession restore datasession
save datasession to statevar _session[ "statevar" ] = statevar // you can then restore the session on the next web page request like this statevar = _session[ "statevar" ] restore datasession from statevar
Products
Recital, Recital Web