如何在嵌入式 Firebird 数据库连接上使用事件?

发布于 2024-10-07 15:57:36 字数 431 浏览 0 评论 0原文

如果我连接到嵌入式 Firebird 数据库并创建远程事件,我会在构造函数中收到 System.NotSupportedException: Specified method is not support.. 。

_fbRemoteEvent = new FbRemoteEvent(_fbConnection);  //_fbConnection is valid and Opened

查看调用堆栈中的源代码,它会导致 FesDatabase.cs,

RemoteEvent IDatabase.CreateEvent()
{
    throw new NotSupportedException();
}

我使用嵌入式版本进行自动化测试......我可以做些什么来从测试上下文中的嵌入式数据库获取事件吗?

If I connect to an embedded Firebird database, and create a remote event, I get System.NotSupportedException: Specified method is not supported.. on the constructor.

_fbRemoteEvent = new FbRemoteEvent(_fbConnection);  //_fbConnection is valid and Opened

Looking at source code from call stack, it leads to FesDatabase.cs with

RemoteEvent IDatabase.CreateEvent()
{
    throw new NotSupportedException();
}

I use the embedded version for automated tests purpose ... Is there something I can do to get event from the embedded database in a test context?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

痴情 2024-10-14 15:57:36

Firebird Embedded 支持事件,但 Firebird ado.net 提供程序 (FirebirdSql.Data.FirebirdClient) 在使用 Firebird Embedded 时不实现对事件的支持。

Events are supported in Firebird Embedded, but the Firebird ado.net provider (FirebirdSql.Data.FirebirdClient) does not implement support for events when using Firebird Embedded.

羁〃客ぐ 2024-10-14 15:57:36

不幸的是,Firebird 中的嵌入模式不支持事件——它们只能通过网络运行。这是因为设置事件处理程序的整个协议涉及设置到 FB 服务器的第二个网络连接——因为您在嵌入式模式下根本不使用网络连接,所以这将不起作用。

Events are unfortunately not supported in embedded mode in Firebird -- they can only be run over the network. This is due to the fact that the whole protocol of setting up an event handler involves setting up a second network connection to the FB server -- as you're not using a network connection at all in embedded mode, this won't work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文