Topic: database is locked

Hi
something went wrong with my project.
whatever I do to save a record it says "database is locked"

the version I use is 1.45 which is a freeware

Re: database is locked

Whether your database is corrupted or you are trying to do 2 actions at the same time within your project. Did you have a system crash whilst your project was running?

https://www.sqlite.org/cvstrac/wiki?p=DatabaseIsLocked

Re: database is locked

Hello.


This problem disappears if restart application?
I remember that there is some bug in the old version related with this error.

Dmitry.

Re: database is locked

Hello,
I'm facing the same problem. The database is locked while trying to save a record. The problem disappears on restarting. MVD Version 5.4. How to solve the issue?

Post's attachments

Attachment icon db_locked.zip 112.52 kb, 300 downloads since 2019-06-05 

Re: database is locked

eyeman303 wrote:

Hello,
I'm facing the same problem. The database is locked while trying to save a record. The problem disappears on restarting. MVD Version 5.4. How to solve the issue?

Hello.


Do you use your database for multiple users on local network?

Dmitry.

Re: database is locked

No. A single user on a desktop machine.

Re: database is locked

eyeman303 wrote:

No. A single user on a desktop machine.

Wrong script may be the cause, please attach your project.

Dmitry.

Re: database is locked

are you using MySql or the local Sqlite?

9 (edited by tcoton 2019-06-05 20:00:25)

Re: database is locked

On Sqlite, a lock occurs when you are trying to read/modify a row at the very same time it is getting modified by the current action. So I guess, you have a refresh action in your scripts or form(s) trying to refresh the data at the very same time you are modifying it with the "Save record" action. The lock is telling you that the data you are trying to modify cannot be performed because another process is currently trying to do something else, most often it is a delete action during an update or a select in the same table you are modifying.

https://www.arysontechnologies.com/blog … se-locked/

Re: database is locked

if you use SQLite and SQLQuery() you must free used DataSet.

SQLQuery('select a from b', tmpDataSet); // database is locked
...
tmpDataSet.Free // database is unlocked
Визуальное программирование: блог и телеграм-канал.