>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