3

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?

Mark Rotteveel
  • 82,132
  • 136
  • 114
  • 158

2 Answers2

0

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.

Mark Rotteveel
  • 82,132
  • 136
  • 114
  • 158
-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.

Gabriel Reid
  • 2,302
  • 16
  • 18
  • Thank you Gab. it's good to know the reason of this limitation. I will use a normal server for my automated tests with a little more intrusive setup. – Luc Jeanniard Dec 16 '10 at 05:12
  • 1
    Events do work on Firebird Embedded, however it is possible that this is not implemented in the Firebird .NET provider (or was not implemented at the time of this post). – Mark Rotteveel Apr 09 '12 at 11:47
  • @MarkRotteveel Is there a working implementation of event usage on Firebird Embedded? As I recall, the event handling handshake required a network connection, which (I thought) is by definition not available in embedded mode. – Gabriel Reid Apr 10 '12 at 07:27
  • @gab I just fixed a bug in Jaybird (JDBC driver) that prevented it from working; now there is no problem. See also http://sourceforge.net/mailarchive/forum.php?thread_name=4F82CF73.5070803%40lawinegevaar.nl&forum_name=firebird-devel – Mark Rotteveel Apr 10 '12 at 17:06