I'm using Unidac 5.3 with SQLite provider.
I have to access database file from some different applications simultaniosly.
I created simple delphi application that creates 1 TUniConnection plus 1 TUniTable.
When it started i run application #2 which access the same database file for update.
So application #2 gets "Database is locked" when tries to commit its updates.
How can i open TUniTable and not lock database file?
My experimets show that problem raise only when i access table with recordcount exceeded TUniTable.FetchRows. When opened table has recordcount less then FetchRows than database file is not locked.
I tried TUniConnection.DisconnectedMode := True with TUniTable.FetchAll := True but it did not help.
SQLITE: Database is locked
-
- Posts: 5
- Joined: Thu 13 Mar 2014 09:49
Re: SQLITE: Database is locked
So. I do not understand - for what reason TUniTable has FetchAll property. It does not work. But TUniTable.SpecificOptions.Values['FetchAll'] does.
And BTW - why SQLite provider does not have 'FetchAll' specificoption? and why does Postgres provider have such an option?
My problem has been resolved by specifying TUniTable.SpecificOptions.Values['FetchAll'] = 'True'.
And BTW - why SQLite provider does not have 'FetchAll' specificoption? and why does Postgres provider have such an option?
My problem has been resolved by specifying TUniTable.SpecificOptions.Values['FetchAll'] = 'True'.
Re: SQLITE: Database is locked
Hello,
TUniTable has no FetchAll property. To set the FetchAll value, you should use SpecificOptions for all the providers.
TUniTable has no FetchAll property. To set the FetchAll value, you should use SpecificOptions for all the providers.
-
- Posts: 5
- Joined: Thu 13 Mar 2014 09:49
Re: SQLITE: Database is locked
It does have.AlexP wrote:Hello,
TUniTable has no FetchAll property. To set the FetchAll value, you should use SpecificOptions for all the providers.
TUntTable -> TCustomUniDataset -> TCustomDADataset
Code: Select all
TCustomDADataSet = class (TMemDataSet)
private
protected
FFetchAll: boolean;
function GetFetchAll: boolean; virtual;
procedure SetFetchAll(Value: boolean); virtual;
property FetchAll: boolean read GetFetchAll write SetFetchAll default False;
public
end;
and if suddenly it is then it does not work.
Re: SQLITE: Database is locked
SpecificOption FetchAll is described in the TUniQuery, TUniTable, TUniStoredProc sections.