How do I avoid table being locked when opening a query (TMyQuery->Open) ?
I have two applications using the same table - the table cannot be used by second application when first application runs a query to generate a report (QuickReport).
What should be selected for TMyConnection or TMyQuery to avoid the locking ?
Regards Hanne
Avoid table locking
The problem occurs because of locking MyISAM tables. If you try to
update underfetched table MySQL waits while it will be completely fetched.
Please refer to MySQL Reference manual 5.3 Locking Issues for details.
To avoid the problem you can use any of following solutions.
- set FetchAll to True;
- change type of the table into, for example, InnoDB.
update underfetched table MySQL waits while it will be completely fetched.
Please refer to MySQL Reference manual 5.3 Locking Issues for details.
To avoid the problem you can use any of following solutions.
- set FetchAll to True;
- change type of the table into, for example, InnoDB.