Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to detect if a shared table is in use in network
Message
 
 
À
23/08/2005 08:33:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01042862
Message ID:
01042863
Vues:
23
This message has been marked as the solution to the initial question of the thread.
>Hi at all,
>
>I am looking if there is any way to detect if a table normaly open shared is in use in a network, this because i need sometime to run a procedure to use functions not allowed on shared file (pack , alter table) and I need to know if any user has open the file shared because I need to open it in exclusive mode.
* Check if table is open by somebody/something else
TRY
  USE mytable EXCLUSIVE
CATCH TO oErr WHEN oErr.ErrorNo = 1705
  *...
ENDTRY

IF USED("mytable")
  * Proceed with process that requires exclusive use
ENDIF
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform