Click here to Skip to main content
Click here to Skip to main content

Embedded Firebird: Full-Featured Embedded Database with 2 MB Runtime

By , 28 Jan 2005
 

Sample Image - screenshot.gif

The advantages of Embedded Firebird

Firebird is a database with 20 years of history, full set of features (including transactions, stored procedures, hot-backup, excellent scalability, etc.) and a friendly open source license. It is an overlooked but compelling alternative to Microsoft Jet and Microsoft MSDE 2000/SQL Express 2005. Let's take a look at how it can be used embedded in your desktop application. What makes Embedded Firebird ideal for embedding:

  • The embedded runtime is < 2 MB (starting at just one DLL + one .NET assembly). The runtime is deployed by simple copying, no installation or component registration is required.
  • The database file (it's just a single file) can have any name and extension. You can associate the extension with your application.
  • The migration to a standalone server couldn't be easier. Just copy the database file to the server and change a connection string on your client.

Working with Embedded Firebird

To start using Embedded Firebird in .NET, you need to download:

  • Embedded Firebird Engine (current stable version is 1.5.2)
  • Firebird ADO.NET Provider (current stable version is 1.6.3)

After creating a new project in Visual Studio .NET, add a reference to FirebirdSql.Data.Firebird.dll (from Firebird ADO.NET Provider installation), and copy fbembed.dll (from Embedded Firebird ZIP package) to the project output directory (e.g., bin/Debug).

The Firebird ADO.NET Provider can connect to a standalone Firebird Server using a connection string like this:

FbConnection c = new FbConnection("ServerType=0;User=SYSDBA;" + 
         "Password=masterkey;Dialect=3;Database=c:\\data\\mydb.fdb");

It can connect to an embedded Firebird using this connection string:

FbConnection c = new FbConnection("ServerType=1;User=SYSDBA;" + 
                 "Password=masterkey;Dialect=3;Database=mydb.fdb");

The database path can be relative to fbembed.dll when using the Embedded Firebird.

You see that switching from embedded and standalone Firebird and vice versa is a piece of cake.

Creating a new database

There are two ways to create a new database:

  • Creating a database programmatically.
  • Copying an existing database template.

It's up to you which way you choose. Copying an existing database is easy (just make sure the template is not open before copying), so let's try to create it programmatically.

Hashtable parameters = new Hashtable();
parameters.Add("User", "SYSDBA");
parameters.Add("Password", "masterkey");
parameters.Add("Database", @"mydb.fdb");
parameters.Add("ServerType", 1);
FbConnection.CreateDatabase(parameters);

Continue as usual

Working with Firebird ADO.NET Provider is easy. You will reuse your experience with other ADO.NET providers. It even has some nice features, like calling the stored procedures using the MSSQL style:

FbCommand cmd = new FbCommand("MYSTOREDPROCEDURE", 
            new FbConnection(connectionString));
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@first", "value1");
cmd.Parameters.Add("@second", "value2");
cmd.Connection.Open();
try
{
    cmd.ExecuteNonQuery();
}
finally
{
    cmd.Connection.Close();
}

Useful Resources

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Dan Letecky

Czech Republic Czech Republic
My open-source AJAX controls:
 
DayPilot
DayPilot MVC
DayPilot Java
Outlook-Like Calendar/Scheduling Controls

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
Questionconnection to an asp.net erpmemberezekielokeyo18-Jul-12 19:08 
connection string: help?
QuestionFor those of you who're interested to get it setup on 64 bit platform (plus create db/table/insert rows) [modified]memberdevvvy14-May-12 2:05 
Tutorial - Get it working with 64 bit Winform
 
REF:
Brief tutorial: http://www.codeproject.com/Articles/9445/Embedded-Firebird-Full-Featured-Embedded-Database
Embedded Firebird: http://www.firebirdsql.org/en/firebird-2-5-1/#Win64
Firebird provider src: http://www.firebirdsql.org/en/net-provider/
Firebird doc: http://www.firebirdsql.org/en/documentation/
Firebird Language reference: http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25.html
Firebird DataType (Compare to M$SQL): http://www.firebirdsql.org/manual/migration-mssql-data-types.html
Firebird Language Reference - CREATE TABLE: http://www.firebirdsql.org/refdocs/langrefupd15-create-table.html
 
STEP 1. Download Firebird embedded dll's - in this example, "Firebird-2.5.1.26351-0_x64_embed" from \Download\Firebird 2.5\Win64\64-bit Embedded
http://www.firebirdsql.org/en/firebird-2-5-1/#Win64
Extract the package. You'd later need to copy "fbembed.dll" and other dll's into your application root directory.

STEP 2. Download .NET Provider
In this example, NETProvider-2.7.5-src. Extract the package and compile with [target=x64] from Visual Studio
http://www.firebirdsql.org/en/net-provider/

Your "Provider" can be found here:
...\ClientProviderSrc\source\FirebirdSql\Data\bin\Debug\FirebirdSql.Data.FirebirdClient.dll

STEP 3. Create a dummy .NET Winform project,
 
STEP 3.1 add reference to your Firebird provider:
...\ClientProviderSrc\source\FirebirdSql\Data\bin\Debug\FirebirdSql.Data.FirebirdClient.dll

Also, put all dll's from Firebird-2.5.1.26351-0_x64_embed package (STEP 1) under application root.

STEP 3.2 From Form1.cs,
using FirebirdSql.Data.FirebirdClient;

STEP 3.3 Add a button, try out basic moves ...

string connectionString = "ServerType=1;User=SYSDBA;Password=masterkey;Dialect=3;Database=";
 
// REF: http://www.codeproject.com/Articles/9445/Embedded-Firebird-Full-Featured-Embedded-Database?msg=4252054#xx4252054xx

private void button1_Click(object sender, System.EventArgs e)
{
string DbFilePath = @"C:\...\EmbeddedDB\Firebird\Sample\EmbeddedFirebirdExample\bin\x64\Debug\TestingDatabase.FDB";
string FullConnString = this.connectionString + DbFilePath;
 
// STEP 1. Create (or Re-create) database and database file
if (!System.IO.File.Exists(DbFilePath))
{
FbConnection.CreateDatabase(FullConnString);
}

 
FbConnection conn = new FbConnection(FullConnString);
conn.Open();
 
// STEP 2. Change default SYSDBA pwd? No!
// This will not work on embedded Firebird!
/*
string AlterPwdCmdSQL = "alter user SYSDBA password 'xyzabc123'";
FbCommand AlterPwdCmd = conn.CreateCommand();
AlterPwdCmd.CommandText = AlterPwdCmdSQL;
AlterPwdCmd.ExecuteNonQuery();
*/
 
// STEP 3. Create a table
// NOTE: Can only do this once!
// REF 1: http://web.firebirdsql.org/dotnetfirebird/blog/2005/01/creating-database-programmatically.html
// REF 2: http://www.firebirdfaq.org/faq69/
// STEP 3.1 Check if table exists - CAUTION: Table name upper case!!!
string SimpleCheckIfTableExists = "select count(1) from rdb$relations where rdb$relation_name = 'EIK'";
FbCommand CheckTableExistCmd = conn.CreateCommand();
CheckTableExistCmd.CommandText = SimpleCheckIfTableExists;
int CountTable = (int)CheckTableExistCmd.ExecuteScalar();
if (CountTable > 0)
{
// Drop table
string SimpleDropTableIfExists = "drop table EIK;";
FbCommand DropTableCmd = conn.CreateCommand();
DropTableCmd.CommandText = SimpleDropTableIfExists;
DropTableCmd.ExecuteNonQuery();
}
 
// STEP 3.2 Re-create the table
// CAUTION:
// (a) "Timestamp" is a reserved keyword for Firebird.
// (b) Table name "eik" -- Actual created table name = "EIK"
string SimpleCreateTableSQL = "create table eik (a int not null primary key, b int not null unique, c timestamp default current_timestamp);";
FbCommand CreateTableCmd = conn.CreateCommand();
CreateTableCmd.CommandText = SimpleCreateTableSQL;
CreateTableCmd.ExecuteNonQuery();

// STEP 4. Insert row
// NOTE: Can only do this once! (PK constraint!)
string SimpleInsertSQL = "insert into eik (a,b) values (123,456);";
FbCommand InsertRowCmd = conn.CreateCommand();
InsertRowCmd.CommandText = SimpleInsertSQL;
InsertRowCmd.ExecuteNonQuery();

// STEP 5. A simple select
FbDataAdapter da = new FbDataAdapter("SELECT * FROM eik", FullConnString);
// FbDataAdapter da = new FbDataAdapter("SELECT * FROM table1", this.connectionString + this.textBox1.Text);
DataTable dt = new DataTable();
da.Fill(dt);
this.dataGrid1.DataSource = dt;
}

 
STEP 4. Bulk Insert?
With SQL Server,

DataRow[] RowsImported = LoadFromSomeDataTable(MyData);
bc = new System.Data.SqlClient.SqlBulkCopy(Conn);
bc.BulkCopyTimeout = 60 * 60;
bc.DestinationTableName = SomeName;
bc.WriteToServer(RowsImported);

 
With Firebird, you have to make do with external table, quoting - http://www.firebirdfaq.org/faq209/

CREATE TABLE ext1 EXTERNAL 'c:\myfile.txt'
(
field1 char(20),
field2 smallint
);

 
To do quick import into regular table, do something like this:

INSERT INTO realtable1 (field1, field2)
SELECT field1, field2 FROM ext1;

 
This insert would still check constraints, foreign keys, fire triggers and build indexes. If you can, it is wise to deactivate indexes and triggers while loading and activate them when done.

STEP 5. You can't change SYSDBA pwd for embedded Firebird - in fact there's no need to do so. The following won't work!

string DbFilePath = @"D:\...\SampleData.FDB";
string FullConnString = this.connectionString + DbFilePath;
FbConnection conn = new FbConnection(FullConnString);
conn.Open();

string AlterPwdCmdSQL = "alter user SYSDBA password 'xyzabc123'";
FbCommand AlterPwdCmd = conn.CreateCommand();
AlterPwdCmd.CommandText = AlterPwdCmdSQL;
AlterPwdCmd.ExecuteNonQuery();


Upon ExecuteNonQuery -

+ ex {"unsuccessful metadata update\r\nI/O error during \"CreateFile (open)\" operation for file \"C:\\...\\EMBEDDEDFIREBIRDEXAMPLE\\BIN\\X64\\DEBUG\\SECURITY2.FDB\"\r\nError while trying to open file"} FirebirdSql.Data.Common.IscException

Seems like I'm not the first person running into this problem:
http://tech.groups.yahoo.com/group/firebird-support/message/83729

Now, quoting here http://www.firebirdsql.org/manual/ufb-cs-embedded.html

The Windows Embedded Server is a Superserver engine plus client rolled into one library, called fbembed.dll. It is available as a separate download package. The embedded server (introduced with Firebird 1.5) was specifically designed to facilitate deployment of applications that ship with a Firebird server included. Installation is just a matter of unpacking the DLL and a few other files to the desired location. The security database is not used at all: anyone can connect to any database, as long as the user running the application has filesystem-level access rights to the database(s) in question... The embedded server has no facility to accept any network connections. Only true local access is possible, with a connect string that doesn't contain a host name (not even localhost).

So, there's nothing you can do to secure an embedded Firebird - you can only secure the Windows machine/OS on which the Firebird db resides.

STEP 6. DbProviderFactories.GetFactory will fail unless you reference the dll from app.config!

DbProviderFactories.GetFactory("FirebirdSql.Data.FirebirdClient"); <-- This will blow up!


To do this,
STEP 6.1 - determine public key token


D:\...\Firebird\ClientProviderSrc\source\FirebirdSql\Data\bin\Debug>gacutil /i FirebirdSql.Data.FirebirdClient.dll
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Assembly successfully added to the cache
 
Now, /u will tell you public key of the dll!

D:\...Firebird\ClientProviderSrc\source\FirebirdSql\Data\bin\Debug>gacutil /u FirebirdSql.Data.FirebirdClient
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.

D:\...\Firebird\ClientProviderSrc\source\FirebirdSql\Data\bin\x64\Debug>gacutil /u FirebirdSql.Data.FirebirdClient
Assembly: FirebirdSql.Data.FirebirdClient, Version=2.7.5.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=AMD64
Uninstalled: FirebirdSql.Data.FirebirdClient, Version=2.7.5.0, Culture=neutral,
PublicKeyToken=3750abcc3150b00c, processorArchitecture=AMD64
Number of assemblies uninstalled = 1
Number of failures = 0

 
STEP 6.2




... other stuff ...

 


<!-- rao: Firebird driver; prefer locally placed driver (any version)-->




... other stuff ...


 
REF: http://programming.2be-it.com/?p=160
dev


modified 16-May-12 4:16am.

Generalembedded firebird with c#.net(3.5) and vs2008membersaurabh.patil@hotmail.com19-May-10 22:12 
hi,
error:
Could not load file or assembly 'System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
 
scenario:
 
used embedded firebird ado.net service provider for databse conectivity.
no issues with firebird's dll coz able to use classes such as FbDataAdapter,FbConnection,FbCommand but when tries to read with FbDataReader or fill dataset with FbDataAdapter it gives this error
i tried using excel database n it works fine...
i hav downloaded firebird installed then added refrance n copied fbembed.dll in \bin\Debug following your tutorial on this site n then jus used namespace FirebirdSql.Data.FirebirdClient; so after that i m able to acces FbDataAdapter etc;
this procedure is fine or somthng missin???
QuestionHow Maintain Firebird Embedded Connection Open!?!?!memberRafael Fernandes Brasil25-Aug-09 4:07 
Hello
 
I´m developing an application using Firebird Embedded, and I would like to know how I can maintain the connection open, in other words, I would like through a Module to open the connection with the database and then close when the application stop.
 
Oww sorry, I´m using VB.NET 2008.
 
Thnks
 
Rafael Brasil
QuestionStill Supported?memberJawz-X8-Sep-08 10:24 
I've been planing to implement this in to a small program that I'm writing (which I may release on CodeProject) but it appears that Embedded Firebird is not longer supported.
 
I found this:
http://www.firebirdsql.org/dotnetfirebird/index.html[^] which is different from the link given to the article.
 
In short, the project was donated to the Core Firebird project. I thought that this was great, it might mean tighter integration.
 
However after some more sifting around, it appears that the project has never been updated.
 
To the best of my ability I've been able to determine this embedded package supports Firebird 2.0.1 on .NET 2.0. But I was hoping to use Firebird 2.1 on .NET 3.5.
 
But quite simply does anyone know one way or another if this project is still supported?
 
Thank you,
Frank
AnswerRe: Still Supported?memberDr.Serdar12-Sep-08 12:35 
fortunately it is still supported Laugh | :laugh:
 
Firebird 2.1 servers
 
www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_download_21[^]
 
Firebird Version 2.5.0 Alpha 2 for Microsoft .NET 3.5 and 2.0
 

http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_download_dotnet[^]
GeneralRe: Still Supported?memberJawz-X16-Sep-08 8:22 
Ahh, I see. I was looking at the wrong pages. How confusing. WTF | :WTF:
 
Anyway, I actually decided to go with SQLite for my project. Same concept but so far support has been better for it. Plus, I'm too deep in now to switch back. Laugh | :laugh:
 
Thank you for your reply and the information!
 
Regards,
Frank
Generaldoesn't work for firebird 2memberujal17-Aug-08 21:10 
this is not working for firebird 2 might be because of version of dlls,
any idea???
 
ujjwal

QuestionProblems with Stored Procedures with Embedded Firebird 2.0memberkiweed17-Jan-08 7:13 
Hi, i switched from Super Server 2.0 to embedded version.
 
Everything almost ok, select, inserts, deletes work fine. However, stored procedures won't work at all, which of course worked well on the SuperServer.
 
Is this normal? Is there something to change on those procedures in order to get them working?
 
Thanks for your time folks.
 

Daniel Sovino
QuestionHelpmemberK_Farhod17-Sep-07 22:46 
How can I change .fdb files?
AnswerRe: Helpmember_CloudyOne_5-Jun-08 14:01 
.fdb stands for firebird database.
 
You "change" it by using firebirdsql to access it, sending mysql commands to edit,add to, and remove from it.
 
Confused | :confused:
QuestionDLL Not Foundmemberjet858-May-07 7:31 
Please, help!
When compile example sources myself, at runtime exception occured
"Unable to load DLL 'fbembed'"
I put fbembed.dll in bin/Debug path, but still not work((
AnswerRe: DLL Not Foundmembertcdavis9-May-07 6:06 
jet85 wrote:
When compile example sources myself, at runtime exception occured
"Unable to load DLL 'fbembed'"
I put fbembed.dll in bin/Debug path, but still not work((

 
I am having the same problem. I am working with C#, .NET 2.0. The Firebird DB is version 2. I can connect to the embedded database with IBExpert. I have the embedded engine and Firebird client installed and a reference to it added to my project. Is there something else I'm missing?

 
Thanks!
TC

GeneralRe: DLL Not Foundmemberjet8510-May-07 9:04 
I solved this problem.
Files icudt30.dll, icuin30.dll, icuuc30.dll must also putted in work directory.
I think it relevant only for Firebird version 2.
 
What is mission of these files? And how to use fb without them?

GeneralRe: DLL Not Foundmembertcdavis10-May-07 9:14 
I forgot I had posted this question. I figured it out yesterday morning and got my connection to open! Now I just need to figure out how to add the Firebird db to my data sources in VS 2005...
 
TC

GeneralRe: DLL Not Foundmemberbalazs_hideghety16-Jul-07 3:41 
In some cases this still is not enough. For example on a win2003 server it's impossible to get such an application run. I've trying now to include also the irectory Intl from the FBEmbed setup...
 
Also someone said that putting the above mentioned DLLs (fbemned, icuuc30, etc.) to the windows\system32 will solve the problem, but didnt Frown | :-(
 
C#, ASPX, SQL, novice to NHibernate

GeneralRe: DLL Not FoundmemberDaberElay31-Jan-09 10:55 
dude u rock!, solved my daily headacke...
Generalnot managedmemberAndrew Shapira4-Feb-07 3:11 
From the Firebird FAQ[^] it seems that Firebird uses a DLL called Fbembed.dll that is not managed. That is, embedding Firebird is unsafe in the C# / common language infrastructure sense of "unsafe". This means that an application that embeds Firebird cannot be installed in scenarios that require safe (trusted) applications. I wanted to point this out in case anyone else, like me, was searching for a safe embeddable SQL database setup.
 
SQLite with System.Data.SQLite seems to have the same characteristics.
 
The search continues..
 
By the way, does the term "embedded database" used in this article have a standard meaning? There is no Wikipedia entry for it.
QuestionChange the password?memberIsmok15-Jan-07 15:39 
Is it possible to change the password (masterkey) for the embedded?
AnswerRe: Change the password?memberBalazs Zoltan16-Jan-07 21:27 
Since the password for the Firebird database is not stored in the db there is no
point of doing that. If someone copies your db she/he will be able to open it with
the default sysdba/masterkey. The user/password has a meaning and point when remote
users are connecting to a Firebird server (when you can't get physical access to the db).
 
I think this is how it works on Fb.
 
company, work and everything else www.netis.ro

GeneralRe: Change the password?membertransoft8-Sep-09 9:02 
Do you have any suggestions for database protection?
 
So nobody can easily open the firebird database file.
 
Thanks,
GeneralRe: Change the password?memberTrinh Tuan4-Sep-10 16:30 
Firebird Defaults: User = "SYSDBA" Pass = "masterkey"
You can add new users or change password sysadmin user in
+ With Firebird 1.x: security.fdb
+ With Firebird 2.x: secutity2.fdb
 
You can find them in Firebird Folder.
 
Best regards
AnswerRe: Change the password? [modified]memberdevvvy15-May-12 14:55 
HUm... I was trying to

string DbFilePath = @"D:\...\SampleData.FDB";
string FullConnString = this.connectionString + DbFilePath;
 
// FbConnection.CreateDatabase(FullConnString);
FbConnection conn = new FbConnection(FullConnString);
conn.Open();
 
string AlterPwdCmdSQL = "alter user SYSDBA password 'xyzabc123'";
FbCommand AlterPwdCmd = conn.CreateCommand();
AlterPwdCmd.CommandText = AlterPwdCmdSQL;
AlterPwdCmd.ExecuteNonQuery();

 
Upon ExecuteNonQuery -
+ ex {"unsuccessful metadata update\r\nI/O error during \"CreateFile (open)\" operation for file \"C:\\...\\EMBEDDEDFIREBIRDEXAMPLE\\BIN\\X64\\DEBUG\\SECURITY2.FDB\"\r\nError while trying to open file"} FirebirdSql.Data.Common.IscException
 
I'm not sure how to ALTER USER and change SYSDBA pwd programmatically... (For Embedded Firebird, not standalone server), Anyone any clue?
 
Seems like I'm not the first person running into this problem:
http://tech.groups.yahoo.com/group/firebird-support/message/83729[^]
 
Now, quoting here[^]
 
The Windows Embedded Server is a Superserver engine plus client rolled into one library, called fbembed.dll. It is available as a separate download package. The embedded server (introduced with Firebird 1.5) was specifically designed to facilitate deployment of applications that ship with a Firebird server included. Installation is just a matter of unpacking the DLL and a few other files to the desired location. The security database is not used at all: anyone can connect to any database, as long as the user running the application has filesystem-level access rights to the database(s) in question... The embedded server has no facility to accept any network connections. Only true local access is possible, with a connect string that doesn't contain a host name (not even localhost).
 
Sounds like there's nothing you can do to secure an embedded Firebird - you can only secure the Windows machine/OS on which the Firebird db resides.
 

REF: Firebird Quickstart Guide (Scroll to page 16)[^]
dev


modified 15-May-12 21:10pm.

QuestionHelp Help HelpmemberLinXG28-Nov-06 14:06 
Hi;
 
I need some help connecting to a regular 1.5 Firebird database using VB.Net. Here's a sample of what I have and the error I'm getting. (I should point that I'm totally new to VB.Net)
 

Public Class Form1
 
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
 
Dim myConnection As FbConnection
Dim myCommand As FbCommand
 
.....
 
The errors tell me that the FbConnection and FbCommand are undefined types. I have FirebirdClient-2.0 installed. I'm obviously leaving out whatever defines FbConnection and FbCommand, however I have know idea what I'm missing and could use a bit of assistance.
 
Thanks
AnswerRe: Help Help HelpmemberArgoDragon4-Dec-06 15:36 
this may help you in vb.net it did me
 
example code from www.experts-exchange.com post
 
hope you find it useful
Pern
Generaldemo source(embedded firebird)membernewgendb23-Nov-06 7:24 
I installed the demo source for this article,
 
Embedded Firebird: Full-Featured Embedded Database with 2 MB Runtime
By Dan Letecky.
 
when I build the application I get this error
 
Error 1 The type or namespace name 'FirebirdSql' could not be found (are you missing a using directive or an assembly reference?) C:\firebirdASP\EmbeddedFirebirdExample\Form1.cs 7 7 EmbeddedFirebirdExample
 
I installed the ado.net provider, the using directive is there, and the assembly reference
what am I missing?? in visual studio 2005, how should I check if the provider is properly installed?
 
is there another demo code somewhere with detailled steps on installing the provider?
 
I am new at this, and probably missing a step
can somebody please help
Daniel
GeneralRe: demo source(embedded firebird)memberBalazs Zoltan23-Nov-06 8:09 
You need to install the Firebird.Net provider too.
Usually it installs to C:\Program Files\FirebirdNETProvider1.7
Then you need to add a reference to the "FirebirdSql.Data.Firebird.dll" file.
It is just like using any other assembly.
 

 
company, work and everything else www.netis.ro

GeneralRe: demo source(embedded firebird)membernewgendb23-Nov-06 8:17 
Thanks for the reply
 
isn't

FireBirdSQL.Data.FirebirdClient not the provider for .net 2.0?
or I need to install both?
 
if not what is it?
Daniel
GeneralRe: demo source(embedded firebird)memberBalazs Zoltan23-Nov-06 9:07 
When you're adding the reference you will see something similar "Firebird .Net Data Provider" after you installed the Firebird .Net provider.
 

newgendb wrote:
FireBirdSQL.Data.FirebirdClient not the provider for .net 2.0?
or I need to install both?

From where you got that ?

 
company, work and everything else www.netis.ro

GeneralRe: demo source(embedded firebird)membernewgendb23-Nov-06 9:14 
thanks
 
from here, it just confuse me
 
http://firebird.sourceforge.net/index.php?op=files&id=netprovider
 
Daniel

GeneralRe: demo source(embedded firebird)memberBalazs Zoltan23-Nov-06 20:35 
After you install from there you just need to add the reference to Firebird provider to the project.

 
company, work and everything else www.netis.ro

GeneralVery interestingmemberWillemM25-Oct-06 21:16 
I didn't know firebird was this good. I always thought it was one of those legacy databases that you shouldn't use anymore in the modern .NET world, but I guess I was wrong.
Having an embedded database engine makes life a lot easier when having to create a setup for an application that makes use of the engine.
 
WM

QuestionHelp Pleasemembertyleray10-Aug-06 5:06 
This demo program works on all computer but my program doesnt work any other computer. It gıves this error: Value cannot be null
parameter name keyword
Why it gives this error? there is an already embedded database and I just want to connect to it. I connect it on my comp but not in any other comp.
Please Help
Thanks
AnswerRe: Help Pleasemember_CloudyOne_5-Jun-08 13:49 
Don't know that anybody answered this, but i was trying to get this error, and did when the database i wanted to connect to was NOT in the same directory as the .exe
 
Just thought i'd throw that out there...
GeneralFireBird and ASP.NETmemberHoyaSaxa933-Aug-06 15:07 
Dan,
 
I saw this post[^] regarding the use of FireBird in ASP.NET applications. Does this limitation still stand?
 
-HoyaSaxa93
Generalsynchronizing between two databasesmemberGilad Kapelushnik19-Apr-06 22:13 
Hi,
 
If there a way to synchronize between two firebird databases assuming that both databases have the same structure and one database has more rows (data rows in its tables) than the other ?
 
I'm looking for a way to do this without an additional software.
 
Gilad.
GeneralRe: synchronizing between two databasesmember_CloudyOne_5-Jun-08 13:58 
To be honest that shouldn't be to hard for you to do in a simple function.
 
"SELECT defaultkeyname FROM database"
 
Replacing defaultkeyname with the primary key for that table, and database with your database name.
 
From there, for comparing, you can either
 
a) pull the other database list the same way, and keep track of which items occur in one and not the other, then send a command to pull each entry from the database that has it and update the one that doesn't...
 
or
 
b) for each item you pulled with your original list,
"SELECT otherdatabaseitem FROM database WHERE defaultkeyname = 'defaultkeyname'"
If it returns something, the other database has it, if it doesn't return something it doesn't have it and you can send the information to that database to sync it.
Then do the same thing for the other database.
 
One takes alot more commands sent to the database, and the other takes more brainwork on your end.
 
Either way, you don't have to BUY software to sync them, but i don't know that there's a built in function...
QuestionDifference?memberS Douglas27-Mar-06 23:40 
Dan,
 
It appears that you’re quite well versed in Firebird, what are the differences between Firebird and SQLite? Or are they comparable?
 
I have an up coming small db project and would like to try something new…
 
Thanks for your time...
 


AnswerRe: Difference?memberDan Letecky28-Mar-06 4:46 
SQLite is much more lightweight. What would be my list to consider:
- SQLite is file-system based (it provides much worse concurrency when under load because it locks the database)
- SQLite doesn't support stored procedures (essential for clean database design IMHO)
- Firebird ADO.NET provider has an excellent support provided by its author, Carlos Guzmán Álvarez.
- Firebird allows you to reuse your code and knowledge for both client-server and embedded scenarios.
 
While SQLite is a replacement for XML files, parsing plain text, etc. Firebird is rather a replacement for something like MSDE.
 

 
--
My sites for smart .NET developers:
DayPilot - Open-source Outlook-like calendar control for ASP.NET
DotLucene - The fastest open source fulltext search engine for .NET
Seekafile Server - Flexible open-source search server
DotNetFirebird - Using Firebird SQL in .NET
GeneralRe: Difference?memberS Douglas28-Mar-06 4:59 
Cool, Thanks for the information.
 
I wasn't aware SQLites scope was so small.
 


QuestionCan I use it on Linux?memberAshraf_s15-Mar-06 1:07 
Is the embedded server ability available on Linux?
AnswerRe: Can I use it on Linux?memberDan Letecky16-Mar-06 23:00 
Yes. Please see http://www.dotnetfirebird.org/embedded-firebird-in-dotnet-faq.
 
--
My sites for smart .NET developers:
DayPilot - Open-source Outlook-like calendar control for ASP.NET
DotLucene - The fastest open source fulltext search engine for .NET
Seekafile Server - Flexible open-source search server
DotNetFirebird - Using Firebird SQL in .NET
GeneralRe: Can I use it on Linux?memberAshraf_s17-Mar-06 5:51 
Thank you for your clarification, it helped alot.
Questionusing FireBirs From MFCmemberrazishamai21-Sep-05 21:49 
Hi,
I want to use an imbedded DB technology
from an old application written in C++ MFC using ODBC.
The application is running over win2003
Can I use Firebird in my case,
Also the application is muli-thread so that I should also
my connection (from within the same process) to the database ?
Are you aware to the performance of Firebird comparing to other in-memory technologies like timesTen and AntsDB ?
Many thanks

AnswerRe: using FireBirs From MFCmemberGreg Strauss23-Jan-06 5:53 
I am accessing Firebird from a C++ MFC application using a utility SQLAPI (http://www.sqlapi.com). This way I can avoid the OLEDB and ODBC hassles, and it works very well for me.
 
There is also an ODBC driver for Firebird available (http://www.firebirdsql.org/index.php?op=files&id=odbc).
GeneralEmbedded server is no security,even the firebird is not security.memberjavasleepless7-Sep-05 18:08 
we can read every Database info if only we get the db file(*.fdb/), even the db file is create in server with the username&password.Confused | :confused:
 

-- modified at 0:09 Thursday 8th September, 2005
GeneralRe: Embedded server is no security,even the firebird is not security.memberDan Letecky2-Nov-05 2:56 
Yes, you are right. Please see Embedded Firebird Security for more details.
GeneralcreateDBmemberjinboh27-Aug-05 18:34 
Hi:
Using your code on dotnetfirebird.org to create DB:
FbConnection cnn = new FbConnection("ServerType=1;User=SYSDBA;Pooling=false;" +
"Password=masterkey;Dialect=3;Database=D:/abcdd.fdb");
 
Hashtable parameters = new Hashtable();
parameters.Add("User", "SYSDBA");
parameters.Add("Password", "masterkey");
parameters.Add("Database", @"D:\abcdd.fdb");
parameters.Add("ServerType", 1);
FbConnection.CreateDatabase(parameters);

always got error:
FirebirdSql.Data.Firebird.FbException: I/O error for file CreateFile (open) "D:\abcdd.fdb"
Error while trying to open file
 
Cna you tell me what's wrong?
The DLL I use is 1.7a, size of DLL:628K

GeneralRe: createDBmembersmeets11627-Sep-05 3:17 
i had the same message.
 
regroup your programm. first create the database, then connect to it.
like this
 
Hashtable parameters = new Hashtable();
parameters.Add("User", "SYSDBA");
parameters.Add("Password", "masterkey");
parameters.Add("Database", @"mydb.fdb");
parameters.Add("ServerType", 1);

FbConnection.CreateDatabase(parameters);

FbConnection c = new FbConnection("ServerType=1;User=SYSDBA;" +
"Password=masterkey;Dialect=3;Database=mydb.fdb");

 
Once your database is created, you will get a new error-message when you start your pragramm the second time. It tells you there already exists a database.
 
Greetings,
Ton
GeneralRe: createDBmemberalsan wong5-Apr-06 11:29 
I have no luck with creating db too.
 
My first attempt is failed because I have rename the fbembed.dll to gds32.dll (as mentioned inside the readme file).
 
Then I rename it back, and I get this exactly message. I've try to modify the path to somewhere else, even with another name, still get no luck.
 
I've try to search through my hdd to locate the created db file. Surprisingly, not found.
 
Please someone tell me why and how, or point me to the related topics, thanks.
 
-- modified at 17:37 Wednesday 5th April, 2006

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130617.1 | Last Updated 28 Jan 2005
Article Copyright 2005 by Dan Letecky
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid