Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use file exclusive question
Message
De
22/07/1999 12:20:41
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
22/07/1999 12:04:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00244710
Message ID:
00244823
Vues:
20
>could'nt you use
>
>if used('filename')&& returns .t. if open
> select filename
> use filename exclusive
>else
> use filename exclusive
>endif
>
>hope this helps
>James
Unfortunately no. used() gets either Alias or workarea as parameter. Tablename might be different. But yes if you want to loop through all aliases in use and check their dbf().
There is another interesting thing though :
use mytable shared
use mytable in 0 again alias myNew Exclusive

doesn't give any error and opens the myTable in new workarea as SHARED.
This would mean looping through aliases you could hit the one opened "again" first and you shouldn't cut your check there.
I think there is no cheap way of determining if a table is opened somewhere already by you or by someone else.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform