Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Private Data Sessions - How Do They Behave?
Message
 
À
07/10/1999 05:58:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00272224
Message ID:
00273769
Vues:
23
Harry,

>agreed - but this is one of those admin cases...

In that case, I would create a login table to track users in the system and then not allow the admin form to run if there are any other users in the system.

>ah - thats new - you mean, even though I've opened it as 'userfile' in the PDS, the rest of the app may not see it as that?

No, that's not what I mean. I mean a table named MyTable can be open with a different alias name. USED() checks for the alais name not the table name. So the following code will cause an error on the USE line inside the IF;
USE MyTable IN 0 && default alias is MyTable
USE MyTable IN 0 Again  && Fox gives this one a unique alias name
USE IN MyTable && Close the first one

IF NOT USED("MyTable")
   USE MyTable IN 0  && Error file is laready in use
ENDIF

* Fixed
IF NOT USED("MyTable")
   USE MyTable IN 0 ALIAS MyTbale AGAIN && No error now
ENDIF
>sounds useful, where can I find an example of that approach?

The sample application in VFP (TasTrader) uses one. Also the Application Wizard uses one as well.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform