Hi,
I have a simple SQLite database and a table where there is an "ID" field that I write incrementing by 1 at each INSERT INTO.
So to have the new ID I simply query "SELECT MAX(ID) FROM USR_TRANSAZ" and the result is the new ID that I will write with "INSERT INTO USR_TRANSAZ(ID, TRANSAZ)........" (I omitted the whole query since it's very simple).
Not everytime but often when the "TSQTransaction.Commit" is executed I get "Database is locked" error.
It's the only task running so I can't see where is the mistake: is it because I'm inserting a record into a table previously opened with a SELECT?
I'm used to program using SQL Server (under Windows) where I never faced this problem.
Thank you, regards.
Roberto