DotNetFirebird.org DotNetFirebird
Using Firebird SQL in .NET.

Embedded Firebird in .NET FAQ

What connection string should I use to connect to the embedded Firebird?

Just use the parameter ServerType with a value of 1:

"Database=database.fdb;ServerType=1"

It is not necessary to specify the username and password for the embedded Firebird.

Can I use a relative path to the database in the connection string?

Yes. It can be relative to the working directory.

Can I use my own database file extension?

Yes. You can use the more or less standard .gdb or .fdb extensions or any other extension. You can for example use your own extension and associate it with your desktop application that opens the database using the embedded engine.

Is it possible to run the embedded Firebird on PocketPC?

No. The only known attempt to port Firebird to PocketPC is Firebird CE project. It has released an alpha version of Firebird 1.0 for Windows CE 3.0 but it seems to be no longer active.

Is it possible to run the embedded Firebird on Linux?

Yes. Follow the instructions:

Is it possible to use the embedded Firebird in my ASP.NET application?

Yes. But Firebird ADO.NET looks for the fbembed.dll file in the application working directory. For ASP.NET application the working directory is the system folder (e.g. C:\WINDOWS\System32). But it's not without problems - read more: How to Use Embedded Firebird in ASP.NET Applications.

How many concurrent connections can you open using the embedded Firebird?

It's not limited. However, only one application can open a database at a time. The application can be a regular Firebird server or your application using the fbembed.dll.

What files are required to use the embedded Firebird?

The following files are required:

  • fbembed.dll (the embedded Firebird itself)
  • FirebirdSql.Data.Firebird.dll (the Firebird ADO.NET Provider assembly)

The following files are recommended:

  • firebird.msg (friendly error messages)

The following files are optional:

  • aliases.conf
  • firebird.conf
  • ib_util.dll
  • intl/fbintl.dll
  • udf/fb_udf.dll
  • udf/ib_udf.dll

Where should I put the embedded Firebird files in my application?

Put them in the working folder of your application. Typically it will be the directory where your .exe file lies.

How is my application affected by the Firebird license?

Firebird is covered by both Initial Developer's Public License and Interbase Public License. Firebird ADO.NET Provider is covered by Initial Developer's Public License.

If you redistribute the Firebird or Firebird ADO.NET Provider you have to follow the license agreements. However, it never affects your own code (in contrast to GPL, for example).

Is the embedded Firebird a managed .NET assembly?

No. Fbembed.dll is a regular DLL library. Only the Firebird ADO.NET Provider (FirebirdSql.Data.Firebird.dll) is a fully managed code.

The database file is still locked even if I call connection.Close(). How can I release the lock?

This is caused by the connection pooling. You have two options:

  1. To turn off the connection pooling using Pooling=false in the connection tring; or
  2. To close all connections when you are finished using FbConnection.ClearPool() or FbConnection.ClearAllPools().