Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking if table in use
Message
De
10/10/2004 04:00:00
 
 
À
10/10/2004 01:56:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00950216
Message ID:
00950222
Vues:
13
Hi Chaim -

That's because the USED() function does not actually check if a table.dbf is in use, but it only tells you if an alias name is used in the local, current datasession.
So you can Try to get exclusive access
TRY
   use mytable again Alias myAlias in 0 excl
CATCH
    Messagebox("Failed to ... ")
ENDTRY

IF USED('myalias')
    &&& continue processing
ENDIF
hth
-Stefan

>Hi all
>How can I check if my table in use?
>When i try this:
> use mytable again in 0 excl
> I get meg\ssage that file access is denied becase my table is in use.
>But when I run the following code:
if used (MYTABLE.DBF')
>messagebox('Used', 0+16)
>else
>messagebox('Not Used', 0+64)
>endif
I get my messagebox answer that my table not in used.
>Help please
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform