how to access firebird database in C# code when creating web project in asp.net?http://forums.asp.net/t/1030522.aspx/1?how+to+access+firebird+database+in+C+code+when+creating+web+project+in+asp+net+Thu, 28 Sep 2006 16:57:49 -040010305221413035http://forums.asp.net/p/1030522/1413035.aspx/1?how+to+access+firebird+database+in+C+code+when+creating+web+project+in+asp+net+how to access firebird database in C# code when creating web project in asp.net? <p>I'd like to ask if somebody could help me with following problem...</p> <p>&nbsp;I'm very new in asp.net and firebird and need to read data from firebird database using c# code (not asp)... </p> <p>&nbsp;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&nbsp; 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:</p> <p>&nbsp;asp:SqlDataSource ID=&quot;SqlDataSource1&quot; runat=&quot;server&quot; ConnectionString=&quot;&lt;%&#36; ConnectionStrings:testDatab %&gt;&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ProviderName=&quot;&lt;%&#36; ConnectionStrings:testDatab.ProviderName %&gt;&quot; SelectCommand=&quot;SELECT LAST_NAME FROM EMPLOYEE&quot;&gt;&lt;/asp:SqlDataSource&gt;</p> <p>where connectionstring (&quot;data source=192.168.2.23;Initial Catalog=&amp;quot;C:\Program Files\Firebird\Firebird_1_5\examples\EMPLOYEE.FDB&amp;quot;;user id=sysdba;password=masterkey&quot;) </p> <p>and providername (&quot;FirebirdSql.Data.FirebirdClient&quot;) are stored in web.config file...&nbsp;</p> <p>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:</p> <p>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)<br> </p> <p>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: </p> <p>The 'FirebirdSql.Data.FirebirdClientServer=192.168.2.23' provider is not registered on the local machine.</p> <p>where 192.168.2.23 is ip of computer where firebird is installed...<br> &nbsp;</p> <p>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?</p> <p>I think I've read already at least 300 different forums and newsgroups by now on similar topics and didnt find anything usefull...<br> &nbsp;</p> 2006-09-28T16:57:49-04:00