SQLite Transaction
Posted: Wed 05 Jan 2022 09:24
Hi,
we have updated our project from Delphi 10.4, UniDAC 8.3.2 to Delphi 11, UniDAC 9.1.1. Now we get an ESQLiteError "database is locked" when opening a second connection to a database while the first connection is in an isolated transaction. Example:
WAL mode, non-DirectMode
-> Is this the right behaviour? I thought a connection to a database is possible, even when another connection is in a transaction. The WAL mode should even enable us to read data...
-> When ommitting the TCRIsolationLevel.ilIsolated parameter, it works. What does this parameter do in the SQLite world? Is this SQLite functionality, or does UniDAC implement a feature that is not available in plain SQLite?
Thanks for your answers!
Cheers
Dominik
we have updated our project from Delphi 10.4, UniDAC 8.3.2 to Delphi 11, UniDAC 9.1.1. Now we get an ESQLiteError "database is locked" when opening a second connection to a database while the first connection is in an isolated transaction. Example:
Code: Select all
FirstConnection.StartTransaction(TCRIsolationLevel.ilIsolated);
try
SecondConnection := TSQLConnection.Create();
try
SecondConnection.Database := '...';
SecondConnection.Open(); // "database is locked"
finnaly
SecondConnection.Free;
end;
except
// ...
end;
-> Is this the right behaviour? I thought a connection to a database is possible, even when another connection is in a transaction. The WAL mode should even enable us to read data...
-> When ommitting the TCRIsolationLevel.ilIsolated parameter, it works. What does this parameter do in the SQLite world? Is this SQLite functionality, or does UniDAC implement a feature that is not available in plain SQLite?
Thanks for your answers!
Cheers
Dominik