Worked like a charm :D Thank you again!
Ale 2011/11/28 Alejandro Martínez <elpeq...@gmail.com>: > Ok! > > I'll check all this points. > > Thank you all a lot. This is my first time working with sqlite and it > is so great finding out that it's got such an active and friendly > community. > > Cheers! > > > > On Mon, Nov 28, 2011 at 3:24 PM, Pavel Ivanov <paiva...@gmail.com> wrote: >>> The thing is, it seems this "readers" don't ever see any changes in >>> the db unless i shut them down and run them again. >> >>> But connecting with the sqlite3 shell shows the changes in the db as >>> they happen. >> >> The above two facts suggest that your "readers" do not close their >> reading transactions properly. I.e. they keep some SELECT statement >> always open (sqlite3_reset or sqlite3_finalize is never called for it) >> and thus all subsequent queries must use the state of the database at >> the time when the first statement began executing. Another more >> complicated scenario would be if you execute one query, before you >> finish with it you start executing second one, then finalize first one >> and before finishing with the second statement start the third one and >> so on. >> Bottom line: check that you call sqlite3_reset or sqlite3_finalize for >> all your statements properly. >> >> >> Pavel >> >> >> 2011/11/28 Alejandro Martínez <elpeq...@gmail.com>: >>> I'd appreciate some direction on how to make this work. >>> >>> I have one process that writes on a database. It "realoads" tables by >>> filling a new table and then replacing the old one via a drop and a >>> rename within a transaction. >>> >>> Then there are several processes that just read from this database. >>> >>> I don't want these "readers" to block, so i made the database "wal". >>> >>> The thing is, it seems this "readers" don't ever see any changes in >>> the db unless i shut them down and run them again. >>> >>> I thought it might be because a checkpoint was not being reached, so i >>> made the writer proccess do a sqlite3_wal_checkpoint_v2(sqcache_conn, >>> NULL, SQLITE_CHECKPOINT_FULL, &a, &b); when it is done updating, to no >>> result. >>> >>> But connecting with the sqlite3 shell shows the changes in the db as >>> they happen. >>> >>> What am i doing wrong? >>> >>> Thanks a lot in advance. >>> >>> Alejandro >>> _______________________________________________ >>> sqlite-users mailing list >>> sqlite-users@sqlite.org >>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >>> >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users