I'd like to ask if somebody could help me with following problem...
I'm very new in asp.net and firebird and need to read data from firebird database using c# code (not asp)...
I work in visual studio 2005 (.net framework 2.0) in C#.I have installed windows XP home edition, firebird client 2.0 and ran FirebirdDDEXProviderPackageLess32.reg on my computer. I have installed firebird server, client and ran FirebirdDDEXProviderPackageLess32.reg
also on remote computer (local server), where is windows 2003 server. I was successfull with connecting to database using SqlDataSource visually step by step through connection wizard... this is how the created code looks in asp:
where connectionstring ("data source=192.168.2.23;Initial Catalog="C:\Program Files\Firebird\Firebird_1_5\examples\EMPLOYEE.FDB";user id=sysdba;password=masterkey")
and providername ("FirebirdSql.Data.FirebirdClient") are stored in web.config file...
However, I dont like this option of visual connecting through connection wizard, nor the option to write it myself in asp because I will have to connect quite a number of databases, which will be loaded through gridview on website interactively... I would
like to make it work through C# code... but when I tried, I came to couple obstacles:
1. its not possible to use SqlConnection object because it doesnt recognize firebird server and I havent found any option how to declare provider name there, so that it distinguish from ms sql server (which is installed on the same computer as firebird server)...
I got an error that it cant connect to ms sql server with user sysdba (default user in firebird)
2. I tried to use OleDbConnection where there is an option to declare provider name, however on opening the connection, it popupped up with following exception:
The 'FirebirdSql.Data.FirebirdClientServer=192.168.2.23' provider is not registered on the local machine.
where 192.168.2.23 is ip of computer where firebird is installed...
could somebody help me please to solve this problem or to direct me to website where I could read more about other possibilities of connecting to database in web project?
I think I've read already at least 300 different forums and newsgroups by now on similar topics and didnt find anything usefull...
tanatko
Member
5 Points
1 Post
how to access firebird database in C# code when creating web project in asp.net?
Sep 28, 2006 04:57 PM|LINK
I'd like to ask if somebody could help me with following problem...
I'm very new in asp.net and firebird and need to read data from firebird database using c# code (not asp)...
I work in visual studio 2005 (.net framework 2.0) in C#.I have installed windows XP home edition, firebird client 2.0 and ran FirebirdDDEXProviderPackageLess32.reg on my computer. I have installed firebird server, client and ran FirebirdDDEXProviderPackageLess32.reg also on remote computer (local server), where is windows 2003 server. I was successfull with connecting to database using SqlDataSource visually step by step through connection wizard... this is how the created code looks in asp:
asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:testDatab %>"
ProviderName="<%$ ConnectionStrings:testDatab.ProviderName %>" SelectCommand="SELECT LAST_NAME FROM EMPLOYEE"></asp:SqlDataSource>
where connectionstring ("data source=192.168.2.23;Initial Catalog="C:\Program Files\Firebird\Firebird_1_5\examples\EMPLOYEE.FDB";user id=sysdba;password=masterkey")
and providername ("FirebirdSql.Data.FirebirdClient") are stored in web.config file...
However, I dont like this option of visual connecting through connection wizard, nor the option to write it myself in asp because I will have to connect quite a number of databases, which will be loaded through gridview on website interactively... I would like to make it work through C# code... but when I tried, I came to couple obstacles:
1. its not possible to use SqlConnection object because it doesnt recognize firebird server and I havent found any option how to declare provider name there, so that it distinguish from ms sql server (which is installed on the same computer as firebird server)... I got an error that it cant connect to ms sql server with user sysdba (default user in firebird)
2. I tried to use OleDbConnection where there is an option to declare provider name, however on opening the connection, it popupped up with following exception:
The 'FirebirdSql.Data.FirebirdClientServer=192.168.2.23' provider is not registered on the local machine.
where 192.168.2.23 is ip of computer where firebird is installed...
could somebody help me please to solve this problem or to direct me to website where I could read more about other possibilities of connecting to database in web project?
I think I've read already at least 300 different forums and newsgroups by now on similar topics and didnt find anything usefull...