Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I check if a dbf is already open?
Message
 
 
À
14/03/2016 10:20:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01632847
Message ID:
01633024
Vues:
58
>>>>>>>>How do I check if a dbf is already open?
>>>>>>>
>>>>>>>Do you mean by the current user, or by other users?
>>>>>>
>>>>>>Both
>>>>>>
>>>>>>Most important though is Current User
>>>>>
>>>>>See my updated reply.
>>>>
>>>>Where is your updated reply? I cant see it
>>>
>>>Can't you see it if you refresh my first reply? Anyway, this is what I added: For the current user, see Used() and Aused() in help. For other users, try to open the dbf exclusive.
>>
>>I am working on this same issue as well in an old legacy app. Can you tell me how you handle to trap this if in fact the file is open by another user when you test it with opening the dbf with exclusive?
>
>Simple.
>
llOK = .T.
>try 
>   use myTable Exclusive
>catch to loexception
>   llOK = .F.
>   messagebox( 'Someone else is using the table!')
>endtry
OK, that sounds like what I need.... thanks for this.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform