Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Works in Development, will it work in distributed app?
Message
 
 
À
31/01/2003 12:49:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00747730
Message ID:
00747754
Vues:
20
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
>
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform