Page 1 of 1
sqlite database locked
Posted: Sat 07 Aug 2010 08:13
by sandy771
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?
Posted: Mon 09 Aug 2010 13:36
by bork
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).
Posted: Mon 09 Aug 2010 14:26
by sandy771
Away from my computer at the moment but the error occurred when writing to a table (post) which generated an exception - database isnlocked. It wa this that caused me to run the monitor.
Posted: Tue 10 Aug 2010 11:24
by bork
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.
Posted: Fri 30 Mar 2012 16:17
by Lepsik
This TUniTable link to TUniDataSource.
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;
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.
Posted: Fri 06 Apr 2012 09:22
by AlexP
Hello,
Please provide a script for creating a table and the versions of your SQLite, UniDAC and IDE in order that we could reproduce the problem.