Welcome! Log In Create A New Profile

Advanced

Locked Record won't unlock

Posted by Paul Ziegler 
Paul Ziegler
Locked Record won't unlock
December 03, 2008 04:16PM
I had a weird problem occur. A record was locked that should not have been. I quit both clients (using Classic mode) and restarted the app but the record was still locked. I used the command HLockRecNum(LFileName,hCurrentRecNum,hLockWrite) to lock the record and HUnlockRecNum(LFileName) to unlock it. the second command has to had run.

Is there a way to check and unlock, or simply run a procedure that will unlock all records for a single client? This way I could run a procedure to unlock all the possible records when something like this happens.

Thanks,

Paul
Fabrice Harari
Re: Locked Record won't unlock
December 03, 2008 07:03PM
Hi Paul...

The only case I've seen of record not being unlocked (aside of course of a bug in my code :-) ) was when I had network problems (hardware or oplock configuration or any of those lovely problems)... In your case, if closing the app that originated the block didn't solve it, it's mostr certainly coming from the hardware or system...

so the right solution is probably to check all that, no try to find a software solution to hide it... This problem may cause other problems (index broken, or even corrupted data)

Best regards

Fabrice Harari
WinDev, WebDev, WinDev Mobile consulting
Al
Re: Locked Record won't unlock
December 03, 2008 10:41PM
Hello Paul

This has happened a couple of times to me in the past and the solution was to reboot the server which is a bit drastic.

If you cannot find the cause you could try this program

[ccollomb.free.fr]

Regards
Al
Paul Ziegler
Re: Locked Record won't unlock
December 03, 2008 10:45PM
Fabrice and Al,

Thanks for the responses. I will keep an eye on it.

Paul
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: