Is it possible to register a Sqlite function in an application and trigger it from another application?
Example:
- I create a trigger which calls MyFunction() after an update
- Application A uses SQLiteFunction.Register to register the function called MyFunction
- Application B makes an update which fires the trigger
When application B makes the update, I receive an error like "Function MyFunction is not defined". Is there a way to register the function with a "global" scope?
PS: The final purpose is that of simulating events across applications using triggers
Thank you
If you're just trying to pass event notifications between multiple applications, SQLite -- or for that matter, any database table -- is the wrong tool for the job.
If the operation is somewhat asynchronous then you might want to use a named
EventWaitHandle
to notify the other process that you've done something it should be interested in, or if there's data involved, stuff the notification and its data in aMessageQueue
for the other application to pick up.Otherwise, you should use a real inter-process communication mechanism like sockets, named pipes, Remoting, WCF, etc.