Hi Friends,
Lets me explain how to connect to FireBird database using .Net. To connect FireBird database using please follows the following steps:
- First check is Firebird installed in local or server? If no install Firebird 2.0
- Download Firebird .Net Dataprovider dll from http://prdownloads.sourceforge.net/firebird/FirebirdClient-2.0.1.exe?download
- In your project add reference of this dll.
- Import namespace using FirebirdSql.Data.Firebird; in your project.
- Please add the following code in your web.config file.
<add key=”connectionstring” value=”Driver={ODBC Driver (*.fdb)}; Database=localhost:C:\test1.fdb;Uid=SYSDBA;DataSource=localhost; Password=masterkey;”/>
6. Write the following code in your codebehind file to check.
FbConnection fbConn = new FbConnection(ConfigurationManager.AppSettings["connectionstring"].ToString());
fbConn.Open();
Response.Write(fbConn.State.ToString());
Hope this will help you…..
I am thankful to my one friend for explaining such good thing.
Posted in C#, ASP.Net