I agree that the solution with the semaphore is a very elegant one, but that
still does not solve the problem of having to define the custom function to
be called from the trigger over and over again. On the other hand, if the
function is not going to be called from the trigger, but from the app A, it
might work, but that does not solve my problem. App A is a black box to me,
and I cannot change it. That is why I need to have app B that will detect
that the change of the database occurred. 


John Stanton-3 wrote:
> 
> If you use a semaphore it is independent of the processes currently 
> running and has nothing to do with a Sqlite connection.  Your custom 
> function is called, signals the semaphore and exits.  When the semaphore 
> is signalled the process waiting on it is activated.
> 
> In your example myfunc performs no synchronization primitives.  In my 
> suggested approach it would signal yourr semaphore to alert the 
> co-operating process that the database has changed.
> 
> BTW, if you are writing new programs do not use the archaic sqlite3_exec 
> call.  Use sqlite3_prepare and sqlite3_stap.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Accessing-external-applications-from-within-SQLite-triggers-tf4614175.html#a13188912
Sent from the SQLite mailing list archive at Nabble.com.


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

Reply via email to