问题
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