开发者

C# Sqlite function across applications

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开发者_JAVA技巧 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 a MessageQueue for the other application to pick up.

Otherwise, you should use a real inter-process communication mechanism like sockets, named pipes, Remoting, WCF, etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜