Firebird.NET Provider and Embedded Server 3

I am trying to use the .NET Firebird provider to connect to the embedded FB 3.0.1 server.

As far as I know (also written here (p. 6) ), fbclient.dll \ fbembed.dll is no longer there but one fbclient.dll client is used for remote and built-in access.

But when I call FBConnection.Open (), I get a System.DllNotFoundException:

Unable to load DLL 'fbembed': 
Impossible to find the specified module (Exception from HRESULT: 0x8007007E).

Any ideas?

+4
source share
2 answers

Looking at the provider code, the default client library is fbembed (possibly for compatibility):

internal const string DefaultValueClientLibrary = "fbembed";

Now, passing the new ConnectionString value, do the trick:

  var connectionString = new FbConnectionStringBuilder
  {
    Database = dbPath,
    ServerType = FbServerType.Embedded,
    UserID = "SYSDBA",
    Password = "masterkey",
    ClientLibrary = "fbclient.dll"
  }.ToString();
+3
source

, . ...

:
NuGet: Install-Package FirebirdSql.Data.FirebirdClient

:
: DLL Visual Studio . .

. . , (, , , "" FB ).
my_project\firebird_server\fbclient.dll

my_project\firebird_server\ib_util.dll

my_project\firebird_server\Plugins\engine12.dll

:

Database=c:\sample_firebird_database.FDB;
User=my_username;
Password=my_password;
ServerType=1; <<-- 1 = embedded server
Charset=UTF8;
ClientLibrary=c:\my_project\firebird_server\fbclient.dll;  <<--Right here
+2

Source: https://habr.com/ru/post/1668519/


All Articles