C# 跨应用程序的 Sqlite 函数
是否可以在应用程序中注册 Sqlite 函数并从另一个应用程序触发它?
示例:
- 我创建一个在更新后调用 MyFunction() 的触发器
- 应用程序 A 使用 SQLiteFunction.Register 注册名为 MyFunction 的函数
- 应用程序 B 进行更新并触发触发器
当应用程序 B 进行更新时,我收到类似“Function MyFunction”的错误未定义”。 有没有办法在“全局”范围内注册该函数?
PS:最终目的是使用触发器模拟跨应用程序的事件
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您只是尝试在多个应用程序之间传递事件通知,那么 SQLite(或者就此而言,任何数据库表)都是错误的工具。
如果操作有点异步,那么您可能需要使用命名的 < code>EventWaitHandle 通知其他进程您已经完成了它应该感兴趣的操作,或者如果涉及数据,则将通知及其数据填充到
MessageQueue
供其他应用程序选取。否则,您应该使用真正的进程间通信机制,如套接字、命名管道、Remoting、WCF 等。
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.