FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ADS clear all locks ?
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
ADS clear all locks ?
Posted: Thu Mar 22, 2012 08:22 PM

Some times my clients leave locks open on the server ( ADS versions 7 to 9 ), perhaps by Ctrl-Alt-Del or power failure. Then if we try to get an exclusive lock ( ie. reindexing ), it is denied.

I know the lock table is maintained on the server ( Advantage Database Server ? ). Is there a command, or process, we can perform on the server ( other then a full reboot ) that will clear the ADS ( Windows ) lock table of all locks placed by all workstations ?

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: ADS clear all locks ?
Posted: Fri Mar 23, 2012 09:45 AM

Timm,

AdsMgGetLockOwner() indicates wthat user has a locked record into a dbf.

AdsMgGetLocks() indcates all records locked.

You can use AdsMgKillUser() to disconnect a user.

AdsWriteAllRecords() writes all pending data and releases all locks.

Hope it helps.

Regards,

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: ADS clear all locks ?
Posted: Fri Mar 23, 2012 03:28 PM

Thank you.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit

Continue the discussion