Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is a Table in Use
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01406905
Message ID:
01407260
Vues:
38
Hi Naomi... Try Catch is a good option..
Thanks for your replies.
regards,
Gerard


>For VFP8 and above just simply wrap USE into the TRY/CATCH.
>
>If you want to get the name of the user who has the table opened, it's more tricky.
>
>>I am trying to identify if a table is in use, by another use on a different pc,
>> and it could also be by a non Foxpro App (eg Report writer)
>>I need to reindex the table but cant do that if anyone else has file open
>>
>>I have tried following:
>> liHandle = FOPEN(tcFileName,2)
>> IF liHandle = -1
>> * File could not be opened
>> llLocked = .t.
>> ELSE
>> * file can be opened exclusive
>> FCLOSE(liHandle)
>> ENDIF
>>
>>However, On My own PC , if I use the command:
>> Use tcFilename
>>It returns that it is being used
>>Is there a way to find out, if other users on the network, apart from myself,
>> have the file open
>>
>>TIA
>>Gerard
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform