Update hook callback only fires on the connection/thread that performed the initiating SQL?
I am developing this Delhi 2009 app with SQLite database version 3.7.9, accessed by the Zeos components. After some valuable assistance from developers on this site, I got my update hook working, (basically, needed cdecl on setup/callback rather than stdcall), and was able to create a DB/tables if needed and initialize some state records etc on startup - fine.  The update hook fired for insert etc. as expected, during this startup phase.

Now I have Intraweb, (IW), forms, (standalone server), connected to my DB tables.  The IW system makes a separate connection for each client/session.  Entering data into the data-aware controls on my IW forms successfully modifies the database records - I can see the changes by refreshing an attached database browser.

It seems that the upate hook I attached during startup does not get called for these updates from the IW pages :(

Does every new session/connection need to connect up its own update hook, and if they do, will the all get called on an update/insert/whatever?

Is there some other way of getting the update hook to fire for every session or some other way of notifying every session of an update via the database?  I understand that any per-session update hook would be called from the session/thread that performed the insert - I'm fine with that, I just want to flag in every session that tables have changed so that the IW forms can update efficiently on the next IWtimer AJAX 'callback'.

If I can't do this with the database callback hook or similar, I'll have to resort to my own inter-thread comms to signal between sessions, but I don't really want to do that if there is a 'database' way.

Rgds,
Martin







Update hook callback only fires on the connection/thread that performed the initiating SQL?
===

I am developing this Delhi 2009 app with SQLite database version 3.7.9, accessed by the Zeos components. After some valuable assistance from developers on this site, I got my update hook working, (basically, needed cdecl on setup/callback rather than stdcall), and was able to create a DB/tables if needed and initialize some state records etc on startup - fine.  The update hook fired for insert etc. as expected, during this startup phase.

Now I have Intraweb, (IW), forms, (standalone server), connected to my DB tables.  The IW system makes a separate connection for each client/session.  Entering data into the data-aware controls on my IW forms successfully modifies the database records - I can see the changes by refreshing an attached database browser.

It seems that the upate hook I attached during startup does not get called for these updates from the IW pages :(

Does every new session/connection need to connect up its own update hook, and if they do, will the all get called on an update/insert/whatever?

Is there some other way of getting the update hook to fire for every session or some other way of notifying every session of an update via the database?  I understand that any per-session update hook would be called from the session/thread that performed the insert - I'm fine with that, I just want to flag in every session that tables have changed so that the IW forms can update efficiently on the next IWtimer AJAX 'callback'.

If I can't do this with the database callback hook or similar, I'll have to resort to my own inter-thread comms to signal between sessions, but I don't really want to do that if there is a 'database' way.

Rgds,
Martin






