Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking at a USEd file
Message
From
30/09/2014 12:51:23
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01608476
Message ID:
01608535
Views:
67
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 :)
Previous
Reply
Map
View

Click here to load this message in the networking platform