I've make some experiments around accessing the SQLite database fom concurent processes at the same time and I find it work good when I'm using transactions every time I touch the database. When I don't, it corrupt the database file sometimes.
> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 26, 2004 7:56 AM > To: [EMAIL PROTECTED] > Subject: [sqlite] multithreading > > > I've been playing around with using SQLite for a data store in a > newsreader app for a few days now, and I keep getting the database > stuck in a locked state. The only thing that seems to fix it is > deleting the file and starting over. I tried recompiling with > -DTHREADSAFE=1, but it didn't seem to make any difference. Since I'm > debugging, I'm crashing a lot before I have a chance to sqlite_close() > the database. Is that the problem? If it is, is there any way to > unwedge a database if the app crashes before closing it? > > I'm trying to access the database from two threads: the UI thread > mostly reads and occasionally updates rows, while the network thread > loads new messages and inserts them. Will that work, or do I just > misunderstand how SQLite does multithreading? > > Many thanks, > -Dave > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]