Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Works in Development, will it work in distributed app?
Message
From
31/01/2003 12:49:50
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Works in Development, will it work in distributed app?
Miscellaneous
Thread ID:
00747730
Message ID:
00747730
Views:
59
The below works in development mode, but will it work in distributed apps? If it will work, is there any reason why NOT to capture the current data environment using this method and restoring it thus?
*Capture Current Environment settings
PRIVATE msafety
msafety=SET('safety')
SET SAFETY OFF
PRIVATE myalias
myalias=''
myalias=ALIAS()
PRIVATE mrecno
mrecno=0
IF !EMPTY(myalias)
	store RECNO() TO mrecno
ENDIF
PRIVATE mviewfile
mviewfile=hdir+sys(3)
CREATE VIEW &mviewfile

*HERE I close tables, open new tables, set relationships, etc for temporary
*stuff will need to get back to original environment

*Restore original environment settings
SET VIEW TO &mviewfile
IF FILE(mviewfile+'.vue')
	DELETE FILE (hdir+mviewfile+'.vue')
ENDIF
IF !EMPTY(myalias)
	SELECT(myalias)
ENDIF
IF mrecno>0
	GOTO mrecno
ENDIF
SET SAFETY &msafety
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Next
Reply
Map
View

Click here to load this message in the networking platform