GetLock method

Top  Previous  Next

See Also Properties Methods Events Example

Unit

MySQLServer

 

Applies to

TMySQLServer component

 

Declaration

function GetLock(const Value: string = 'MyLock'; TimeOut: integer = 0): integer;

 

Description

This is the implementation of MySQL's get_lock sql function.  It will obtain you a server wide lock with a name and with a timeout.  If your connection drops or someone does a kill on your connection, the lock will be released.  This allows you to lock multiple application client locks for ad hoc operations.   See also ReleaseLock and please see your MySQL Manual for more details on the get_lock function.