Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking at a USEd file
Message
De
30/09/2014 12:51:23
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01608476
Message ID:
01608535
Vues:
66
OK, we're almost there. When program 1 says:
USE foo EXCL
This works in program 2:
	TRY
		USE foo SHARED
	CATCH TO ww
		MESSAGEBOX(ALLTRIM(STR(ww.errorno)))
	ENDTRY
HOWEVER when program 1 says:
USE foo
flock()
the 2nd program just hangs with the following message in the status bar:
Attempting to lock... Press <esc> to cancel
How can I handle that situation gracefully with TRY..CATCH? I need this sisnce the other system seems to be doing something like flock().

Thanks,

Yossi

>>Thanks to all. I don't have any control over the system that is using exclusively.
>>
>>I guess I will have to talk with the programmer.
>>
>
>Or...
>
>Wake up very early one day, or better yet, create a stub program that tries to open the table in a try catch loop that ends once you get the file open and leaves it open, so whenever someone stops the program that opens the file exclusively, your program will open it in shared mode and all your users will be able to use your main program, of course when someone starts the other program, as it tries to use the table exclusively, it will fail, but that, my friend, will NOT be YOUR problem, but will be the other developer's problem, who will need to fix HIS program :)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform