I am having an odd problem with sqlite.
I am trying to update a few records in a database but am getting a database is locked error.
I am runing dbMonitor to see if I can determine where the error is. All calls prior to the error return status complete and are simple select * from table commands
I then see this
07/08/2010 08:07:30 0.000 Start: Complete
07/08/2010 08:07:30 0.000 Savepoint LOCK_ThumbTab Complete
07/08/2010 08:07:30 0.000 Rollback to savepoint LOCK_ThumbTab Error
07/08/2010 08:07:41 0.000 Commit: Complete
07/08/2010 08:07:41 0.889 SQL Execute: select * from rtable
Complete
any ideas what this is or what might be causing it?
sqlite database locked
Hello
Why do you think that this error is connected with record locking? Savepoints can contain any name and if savepoint contains "LOCK" in the name it doesn't mean that record locking is cause of error.
To help you resolve this issue we need the exact text of this error. Also we need information when you got this error: on calling the Edit or Post method, or on calling some script (in this case we need the text of the script).
Why do you think that this error is connected with record locking? Savepoints can contain any name and if savepoint contains "LOCK" in the name it doesn't mean that record locking is cause of error.
To help you resolve this issue we need the exact text of this error. Also we need information when you got this error: on calling the Edit or Post method, or on calling some script (in this case we need the text of the script).
When you are able to reproduce this error, please provide me the exact text of the error message, and please provide me the part of your code where you modify this record. Also I need to know which component you are using: TUniQuery or TUniTable, the CachedUpdates and LockMode properties values, if you are modifying record in the transaction or not. This information will help me to reproduce this issue.
This TUniTable link to TUniDataSource.
in logs:
12:12:08|E| [TISCData.ISCDatabaseError]- Error code: 1. SQL logic error or missing database.
in monitor:
UPDATE WINDPROF
SET
Data_1 = ?
WHERE
PKey = ?
Data_1 = 0.1
Old_PKey = 1
---------------------------------------------------------------------
This is happend only with SQLite version. MSSQL version works fine.
Code: Select all
try
WindProf.DisableControls;
try
WindProf.First;
WindProf.Edit;
WindProfData_1.Value := 0.1;
WindProf.Post; // 1. here exception happends
finally
WindProf.EnableControls; // 2. after exception jump here
end;
except
on e: exception do
begin
LogError( e.Message, funcName ); // 3. then here
end;
end;12:12:08|E| [TISCData.ISCDatabaseError]- Error code: 1. SQL logic error or missing database.
in monitor:
UPDATE WINDPROF
SET
Data_1 = ?
WHERE
PKey = ?
Data_1 = 0.1
Old_PKey = 1
---------------------------------------------------------------------
This is happend only with SQLite version. MSSQL version works fine.