【问题标题】:How to use events on an Embedded Firebird database connection?如何在嵌入式 Firebird 数据库连接上使用事件?
【发布时间】:2010-12-14 11:02:20
【问题描述】:

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

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

从调用栈查看源代码,导致FesDatabase.cs带有

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

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

【问题讨论】:

    标签: c# events firebird firebird-embedded firebird-.net-provider


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

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

      【讨论】:

      • 谢谢加布。很高兴知道这种限制的原因。我将使用普通服务器进行自动化测试,并进行一些侵入性设置。
      • 事件在 Firebird Embedded 上确实有效,但是这可能在 Firebird .NET 提供程序中没有实现(或者在本文发布时没有实现)。
      • @MarkRotteveel Firebird Embedded 上是否有有效的事件使用实现?我记得,事件处理握手需要网络连接,(我认为)根据定义在嵌入式模式下不可用。
      • @gab 我刚刚修复了 Jaybird(JDBC 驱动程序)中的一个错误,该错误导致它无法工作;现在没有问题了。另见sourceforge.net/mailarchive/…
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-10
      • 1970-01-01
      • 2023-03-18
      • 1970-01-01
      • 2012-08-27
      • 2017-09-28
      相关资源
      最近更新 更多