Additional
AnyDAC
SimpleIAX
Forums
Welcome, Guest
Please Login or Register to post messages. Lost Password?
SQLite Multi-user
(1 viewing) 1 Guest
Go to bottom
TOPIC: SQLite Multi-user
#20060
zsleo
Fresh Boarder
Posts: 17
graphgraph
Karma: 0
User Offline Click here to see the profile of this user
SQLite Multi-user 2012/02/03 06:41 (3 Months, 2 Weeks ago)
I have 2 EXE's in the same computer accessing the same DB.

My connection code is as follows:

Code:

  
  conAnyDAC1.Params.Clear;
  conAnyDAC1.Params.CommaText := '"Database=' + lv_DBN + '"'
    + ',"SQLITE_DEFAULT_AUTOVACUUM=2"'
    + ',"SQLiteAdvanced=auto_vacuum = 1;page_size = 4096;temp_store = FILE;Journal_Mode = WAL;"'
    + ',"LockingMode=Normal"'
    + ',"Synchronous=Full"'
    + ',"DriverID=SQLite"';


  conAnyDAC1.Connected := True;



The second EXE requests records from the DB the following error is generated:

[AnyDAC][Phys][SQLite] ERROR: database is locked.

Please advise...

The same connection settings are used during the create of the database.

TIA
Logged Logged
The administrator has disabled public write access.
#20064
TSupport
Moderator
Posts: 279
graphgraph
Karma: 7
User Offline Click here to see the profile of this user
Re:SQLite Multi-user 2012/02/05 23:51 (3 Months, 2 Weeks ago)
Hello,

Thank you for the inquiry.

To optimize your work with SQLite in a multi-user mode please consider reviewing this article: www.da-soft.com/anydac/docu/Using_SQLite_with_AnyDAC.html (Connecting to SQLite database from Delphi application section - Application specifics #4 - 6).
In addition to your parameters please add:
Code:

conAnyDAC1.Params.Add('SharedCache=False');

In case this still doesn't work for you, please send us the simple test project to verify all your parameters. Also please provide the environment report (www.da-soft.com/anydac/docu/DBMS_Environment_Reports.html ).
With best regards,
DA-SOFT Technologies Support Team
Logged Logged
Last Edit: 2012/02/05 23:52 By TSupport.
The administrator has disabled public write access.
Go to top