2

我正在编写 .NET 4 应用程序,同步数据。我想使用 Firebird (v2.5) 事件,就像在这个例子中一样。

我的问题:我是否需要一个额外的连接来监听事件和第二个连接来传输数据?我在示例中看到,事件侦听器的连接保持打开...

谢谢你的答案。

4

2 回答 2

1

理论上,您可以使用用于启动事件的连接来侦听数据传输。事件在后台使用不同的渠道。

于 2012-06-20T10:33:59.100 回答
1

所以,我只是用客户端的最新版本(v 2.7.7)做了一些测试,看起来连接必须保持打开状态。如果我关闭连接,侦听线程会因此异常而终止(来自调试输出):

A first chance exception of type 'System.InvalidOperationException' occurred in FirebirdSql.Data.FirebirdClient.dll
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in FirebirdSql.Data.FirebirdClient.dll
An exception of type 'System.Threading.ThreadAbortException' occurred in FirebirdSql.Data.FirebirdClient.dll but was not handled in user code
The thread 'FirebirdClient - Events Thread' (0x1e8c) has exited with code 0 (0x0)
于 2012-06-20T16:45:23.020 回答