Nathan Conrad wrote:
Hi,
I am working on a Linux program written in C. I would like to be able
to set up a trigger that calls a C function so that my application
knows when a certain table has changed so that it can update its UI.
Can this be done? Is there sample code somewhere?
Use sqlite3_create_function() to define the function that will be
called. Then create a trigger like this:
CREATE TRIGGER example AFTER UPDATE ON table1 BEGIN
SELECT my_trigger_callback_function();
END;
Note, however, that my_trigger_callback_function() will only
get called in the process that does the update. If another
process updates the table, then the trigger is invoked in that
other process not in the local process.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565