On Fri, Mar 20, 2009 at 07:35:07PM -0700, Roger Binns wrote: > Ricky Huang wrote: > > My question is, does SQLite offer ways of hooking up a second > > application to changes in a shared DB without polling? > > Nope. However your operating system should provide a notification for > file changes (eg inotify/dnotify on Linux, FindFirstChangeNotification > on Windows).
That's not necessarily so useful. The OS can't know when a SQLite3 transaction has finished, so the only way to use inotify-like interfaces is to watch for the journal file being removed. But IIRC there's an option to make SQLite3 never remove the journal file, just truncate it at the end of each transaction. So there's no safe way to use such APIs to detect the end of a SQLite3 transaction. What you need to do is have the first application use IPC to let the second application know that the DB has been updated. Nico -- _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

