You could poll the database as Micah suggested. However you may get into the locking problems that I have. When two processes attempt a read and write at the same time, as statistically will happen using this method, your have a LOCK failure.

A method I suggest is using a log file. When you update your database, add a line to a log file. Your second process simply reads the log file, checking whether the EOF has moved every second or two. A more complex version would be to use something like RSS. Broadcast changes from one system, or from your own SQLite wrapper. Read the RSS from other processes.

Hope this is of some use :)

Ben

F.W.A. van Leeuwen wrote:
I've asked this two weeks ago but no reply yet...

I've got one application that writes to the database, and one that reads from it. When a table in the database has changed, the reading application needs to know that. Of course I can send a signal from the writer to the reader app, but if the database would have a means for that, I think it would be more elegant (not directly coupling the writer and the reader). So it would be nice if a C application could subscribe to "table changed" events. I don't think it is currently possible with SQLite, is it?

Frank.




Reply via email to