Shared Cache Mode or Unlock Notification
Posted: Fri 30 Aug 2013 14:05
Hello Devart-Team,
I'm trying to handle multiple connections to a single database. My problem is the "database is locked" ESQLiteError, which occurs whenever the database is exclusively locked (during writing). According to the SQLite homepage (www.sqlite.org) there are two possibilities for me:
1. Unlock Notify (http://sqlite.org/c3ref/unlock_notify.html)
Using Unlock Notify would enable me to queue my posts and solving the problem smoothly.
Is there a simple implementation for this in DBExpress? Could you give me a code sample for it? And is there a disadvantage (besides the ones listed on the homepage) by using Unlock Notify?
2. Shared Cache Mode (http://www.sqlite.org/sharedcache.html)
I'm not sure if this would fix my problem, but I'm willing to try it. As we are using multiple database types over DBExpress, I can't use the TSQLiteConnection. Instead I'm using the TSQLConnection from SqlExp.pas. Is there a possibilty to use Shared Cache Mode with this kind of connection? Or does it only work with the TSQLiteConnection?
Thanks in advance an best regards
Markus
I'm trying to handle multiple connections to a single database. My problem is the "database is locked" ESQLiteError, which occurs whenever the database is exclusively locked (during writing). According to the SQLite homepage (www.sqlite.org) there are two possibilities for me:
1. Unlock Notify (http://sqlite.org/c3ref/unlock_notify.html)
Using Unlock Notify would enable me to queue my posts and solving the problem smoothly.
Is there a simple implementation for this in DBExpress? Could you give me a code sample for it? And is there a disadvantage (besides the ones listed on the homepage) by using Unlock Notify?
2. Shared Cache Mode (http://www.sqlite.org/sharedcache.html)
I'm not sure if this would fix my problem, but I'm willing to try it. As we are using multiple database types over DBExpress, I can't use the TSQLiteConnection. Instead I'm using the TSQLConnection from SqlExp.pas. Is there a possibilty to use Shared Cache Mode with this kind of connection? Or does it only work with the TSQLiteConnection?
Thanks in advance an best regards
Markus