How to use events on an Embedded Firebird database connection?

被刻印的时光 ゝ 提交于 2019-12-10 18:04:41

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/4438451/how-to-use-events-on-an-embedded-firebird-database-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!