ADS clear all locks ?

ADS clear all locks ?

Postby TimStone » Thu Mar 22, 2012 8: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: ADS clear all locks ?

Postby lucasdebeltran » Fri Mar 23, 2012 9: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.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: ADS clear all locks ?

Postby TimStone » Fri Mar 23, 2012 3: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 107 guests