Hi
Here some steps to connect Firebird Database with Dotnet Framework.
-
First Check Firebird installed on your local pc or Server ? If no, Install Firebird 2.0
-
To connect Firebird with Dotnet, we need Firebird .Net Data provider dll, You can download same from
http://prdownloads.sourceforge.net/firebird/FirebirdClient-2.0.1.exe?download
-
In your project, add this dll as reference.
-
In web.config write the connection string for Firebird. It is
<add key=”connectionstring” value=”Driver={ODBC Driver (*.fdb)}; Database=localhost:C:\test1.fdb;Uid=SYSDBA;DataSource=localhost; Password=masterkey;”/>
-
Now in your page, Inport namespace like using FirebirdSql.Data.Firebird;
-
Write given code
FbConnection fbConn = new FbConnection(ConfigurationManager.AppSettings [“connectionstring”].ToString());
fbConn.Open();
Response.Write(fbConn.State.ToString());