But I think we do not have to take care of synchronizing sqlite access. sqlite internally does if it is compiled with THREADSAFE=1.
On 6/18/07, John Stanton <[EMAIL PROTECTED]> wrote:
The problem is fairly straight forward. Sqlite is a single resource being shared by multiple thyreads so you just use fundamental synchronization logic as you would when sharing any resource between competing threads. Sabyasachi Ruj wrote: > Hi, > > I am using sqlite in a multithreaded environment. I have take > reasonable like not sharing sqlite* handles. I am creating a new sqlite* > for > every thread. > > Where can we get more info on working with SQLite in a multithreaded > environment? > > The application is working as a service in windows. > > sqlite3_step() is failing with the following error message: > > * SQL error or missing database > SQL logic error or missing database* > > I am getting this message after running the application for quite a long > time (few days). > And then if I execute *PRAGMA INTEGRITY_CHECK* on that table, I get the > same > error message. > > My application updates the database very 2 mins and the corruption happend > randomly > > I dont have any clue how to debug this! > > Thanks. > > On 5/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> "Sabyasachi Ruj" < [EMAIL PROTECTED]> wrote: >> > Hi, >> > Is there any way to programmatically fix a corrupted sqlite database? >> > I am using sqlite version 3.3.8 with C APIs >> > >> >> Sometimes VACUUM or REINDEX will help, but usually not. >> You can also try to recover using: >> >> sqlite3 OLD.DB .dump | sqlite3 NEW.DB >> >> But that doesn't always work either. The best approach >> is to avoid corruption in the first place. >> -- >> D. Richard Hipp <[EMAIL PROTECTED]> >> >> >> >> ----------------------------------------------------------------------------- >> >> To unsubscribe, send email to [EMAIL PROTECTED] >> >> ----------------------------------------------------------------------------- >> >> >> > > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------
-- Sabyasachi