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 13:26:27
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00747730
Message ID:
00747761
Views:
15
Your changes are interesting. I had it using SELECT instead of alias() originally but when it restored the view, the work area was different for the file that was originally selected and it bombed. Is a view supposed to maintain the same work areas for the files?

Tracy

>I would make a couple of changes:
>
>>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 lnSelect  && myalias
>>lnSelect = SELECT()   && myalias=ALIAS()
>>PRIVATE mrecno
>>mrecno=0
>>IF !EMPTY(ALIAS()) and NOT EOF()
>>	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
>SELECT (lnSelect)
>*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"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform