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 :)