A trigger updating a time modified entry in an Sqlite table would do the job.

[EMAIL PROTECTED] wrote:
If you are just looking for a simple detection,  a process could "touch" or
update a flag file, which might be empty or whatever.
I have not seen the C API.  I am not sure about the scope or  effort.
But, there could be other methods.   One might be to  "mark"  records with
pending / changed transactions.   Of course, it would require an extra
column in the database.   Without that,  I would consider creating a
secondary table or database  which other processes could update.  It would
hold a list of records changed/accessed by a given PID or user-id.  When a
process requests a record, update the 2nd database with the key and the
user or PID.  When finished, delete it.      Hope this helps.

Good luck.



Ken <kennethinbox-sql [EMAIL PROTECTED]> To <sqlite-users@sqlite.org> 02/02/2007 09:52 cc AM Subject Re: [sqlite] Auto-detection of Please respond to database change in multi-process <kennethinbox-sql environment [EMAIL PROTECTED]>



As I see it you have only 3 options.

 1. Polling.
     Polling on a table in sqlite or depending upon your app. You could
simply check the file access modifiers to see when the last modifaction
time was.

 2. Set up an IPC semaphore

 3. Set up a socket.



David GIGUET <[EMAIL PROTECTED]> wrote: Hi,

Iam working on the design of a multi-process architecture accessing a
single database. Is there a way for one of the process to detect that
another process has modified the database ? I would like to avoid regular
polling of the database to check for modifications and I also would like
to avoid ipc or creation of an sqlite server on top of the database. If it
does not exist do you think I can open the database file (either with
sqlite or with file system), create a thread with a select or
sqlite_busy_handler that is pending on detection of file modification ?

Thanks for your help,

David



" Ce courriel et les documents qui y sont attaches peuvent contenir des
informations confidentielles. Si vous n'etes pas le destinataire escompte,
merci d'en informer l'expediteur immediatement et de detruire ce courriel
ainsi que tous les documents attaches de votre systeme informatique. Toute
divulgation, distribution ou copie du present courriel et des documents
attaches sans autorisation prealable de son emetteur est interdite."

" This e-mail and any attached documents may contain confidential or
proprietary information. If you are not the intended recipient, please
advise the sender immediately and delete this e-mail and all attached
documents from your computer system. Any unauthorised disclosure,
distribution or copying hereof is prohibited."



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to