Re: [sqlite] Accessing locked databases

2005-04-29 Thread Gé Weijers
Tomas Franzén wrote:
> Hi,
> 
> I'm using SQLite to access a database that is created and used by 
> another application. Sometimes when I try to access it, I get an  error
> back that the database is locked. This lock seems to be pretty  long
> lasting, so I don't think I can't wait until it's unlocked. How  can I
> bypass this lock? I only need to read from the database, so  there is no
> risk of me overwriting something.

When the database is locked for writing you can assume the file is
actually in an inconsistent state. The application holding the lock has
started to modify the file and until the lock is released there is no
guarantee that another application could do anything useful with the
contents of the file.

Solution: modify the other application to make sure it does not hold the
lock too long, or switch to a database that allows reading during
transactions.

Gé



> 
> Any ideas? Solutions? Workarounds?
> 
> Thanks.
> 
> Tomas Franzén
> Lighthead Software
> http://www.lightheadsw.com/
> 



[sqlite] Accessing locked databases

2005-04-29 Thread Tomas Franzén
Hi,
I'm using SQLite to access a database that is created and used by  
another application. Sometimes when I try to access it, I get an  
error back that the database is locked. This lock seems to be pretty  
long lasting, so I don't think I can't wait until it's unlocked. How  
can I bypass this lock? I only need to read from the database, so  
there is no risk of me overwriting something.

Any ideas? Solutions? Workarounds?
Thanks.
Tomas Franzén
Lighthead Software
http://www.lightheadsw.com/