Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ISRLOCKED doesn't work for me
Message
 
To
03/05/2016 14:44:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01635773
Message ID:
01635800
Views:
61
>2) FINALLY will always run so you can take out the SET REPROCESS inside the CATCH and move the one at the end inside the FINALLY.

I've never understood the finally, other than eye candy, the code after the endtry will run anyways so while I agree with you that the set reprocess inside the catch should be removed, I do not see the need to move the other one inside the finally. I am sure I am missing something about finally though

>>This tested ok.....
>>
>>
>>TRY
>>	SET REPROCESS TO 1
>>	REPLACE status WITH 2 IN ss_io FOR status = 5
>>CATCH
>>	SET REPROCESS TO AUTOMATIC 
>>	MESSAGEBOX("Cannot delete the records at this time.....  another user has has one of the records open at this time.... try again later",0+16,"Cannot Delete Records")
>>FINALLY
>>ENDTRY 
>>
>>SET REPROCESS TO AUTOMATIC 
>>
>>
>>The REPLACE statement attempts to lock all the affected records ( status = 5 ) and lock them.
>>
>>It can't, since I have one of the affected records locked in another instance of VFP.
>>
>>So I drop down to CATCH, then finally to the end.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform