2

I am trying to run firebird embedded database from my MVC 6 application. I am using Fluent Nhibernate. The configuration is shown below:

var firebird = new FirebirdConfiguration();

var cs = @"User=SYSDBA;Password=masterkey;Database=SampleDatabase.fdb;DataSource=localhost;
Port = 3050; Dialect = 3; Charset = NONE; Role =; Connection lifetime = 15; Pooling = true;
            MinPoolSize = 0; MaxPoolSize = 50; Packet Size = 8192; ServerType = 1; ";

SessionFactory = Fluently.Configure()
                .Mappings(m => m.FluentMappings.AddFromAssembly(Assembly.GetExecutingAssembly()))
                .Database(firebird.ConnectionString(cs)).BuildConfiguration()
                .BuildSessionFactory();

I have also installed the nuget package FirebirdSql.Data.FirebirdClient

However I am getting the error:

Unable to load DLL 'fbembed': The specified module could not be found.

I am trying to include this dll in my reference but then I am getting the build error saying this reference cannot be restored.

enter image description here

enter image description here

What do I need to do to get this running ?

P.S: I have also failed to use SQLite due to a similar situation/error.

Cemre Mengü
  • 18,062
  • 27
  • 111
  • 169
  • Where did you put `fbembed.dll` (and supporting files). Note that including it as a reference is not really going to work, and Firebird embedded is not included with `FirebirdSql.Data.FirebirdClient`. The Firebird embedded files need to be on the path (or in the same folder as the application) when the application is run. – Mark Rotteveel Aug 19 '15 at 14:35
  • Note that using firebird embedded with a web application is - in my opinion - a slightly strange choice: it would be better to use a real Firebird server, as then you don't run into architecture mismatch (32 bit vs 64 bit) problems depending on the deployment. – Mark Rotteveel Aug 19 '15 at 14:37
  • @MarkRotteveel thanks i will try that. I am trying to setup a db for testing purposes. That is why i am using the embedded version. – Cemre Mengü Aug 19 '15 at 14:44
  • I know of people who have used Firebird embedded with an ASP.net application, so it is possible, but I think you need to apply some tricks with the deployment to get it working. – Mark Rotteveel Aug 19 '15 at 18:27

1 Answers1

0

You might need to add fbembed.dll to the bin folder in your asp.net application also the icu* files (from Embedded Firebird ZIP package) into the bin folder.

Mariuz
  • 1,190
  • 2
  • 10
  • 19