Migrating from MyDac to UniDac : how to lock a table ?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Migrating from MyDac to UniDac : how to lock a table ?

Post by swierzbicki » Sat 17 Dec 2011 21:52

Hello,

LockTable is missing from TUniTable/TUniQuery !
How can I lock a table with UniDAC ?

AndreyZ

Post by AndreyZ » Mon 19 Dec 2011 12:07

Hello,

To lock a table or tables, you should use the following code:

Code: Select all

UniConnection.ExecSQL('LOCK TABLES tablename READ',[]);
To unlock tables, you should use the following code:

Code: Select all

UniConnection.ExecSQL('UNLOCK TABLES ',[]);
For more information, please refer to http://dev.mysql.com/doc/refman/5.0/en/lock-tables.html

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Mon 19 Dec 2011 20:32

Thank you !

Post Reply