Difference between revisions of "RESTORE DATASESSION"

From Lianjapedia
Jump to: navigation, search
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
Save the status of the current data session
+
Restore a saved data session
  
 
==Syntax==
 
==Syntax==
Line 6: Line 6:
  
 
==See Also==
 
==See Also==
[[REPLACE()]], [[RESTORE RECORDVIEW]], [[SAVE DATASESSION]], [[SKIP]]
+
[[DATASESSIONLEVEL()]], [[POP DATASESSION]], [[PUSH DATASESSION]], [[REPLACE()]], [[RESTORE RECORDVIEW]], [[SAVE DATASESSION]], [[SAVE RECORDVIEW]], [[SKIP]]
  
 
==Description==
 
==Description==
Line 23: Line 23:
 
* found() status
 
* found() status
  
The [[SAVE DATASESSION]] command may be used to save 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.
+
The [[SAVE DATASESSION]] command may be used to save the above information. SAVE and RESTORE DATASESSION can be used with Lianja Web session variables ( _SESSION[ ] ) to maintain context between different .rsp web page requests.
  
 
==Example==
 
==Example==
Line 47: Line 47:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
[[Category:Screen Forms]]
+
[[Category:Databases]]
[[Category:Screen Forms Commands]]
+
[[Category:Lianja VFP Extensions]]
 +
[[Category:VFP Command Extensions]]

Latest revision as of 06:03, 19 March 2018

Purpose

Restore a saved data session

Syntax

RESTORE DATASESSION [ FROM <memvar>]

See Also

DATASESSIONLEVEL(), POP DATASESSION, PUSH DATASESSION, REPLACE(), RESTORE RECORDVIEW, SAVE DATASESSION, SAVE RECORDVIEW, SKIP

Description

The RESTORE DATASESSION command is used to restore the status of all open tables. The RESTORE DATASESSION command restores the following context pertaining to the saved session (See SAVE DATASESSION):

  • Currently selected cursor/workarea
  • Cursor/Workarea number
  • Database name
  • Full path of table
  • All index files
  • Current record number
  • Current index order
  • Lock status
  • eof() status
  • bof() status
  • found() status

The SAVE DATASESSION command may be used to save the above information. SAVE and RESTORE DATASESSION can be used with Lianja 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