title: How to connect and use Firebird db embedded server with Visual C# 2010
body: <p>I was trying to use Firebird embedded server with Microsoft Visual C# 2010.
  so here is what I done till now:</p>
  
  <ol>
  <li><p>Downloaded <strong>Firebird .Net Data Provider</strong> (<a href="http://sourceforge.net/projects/firebird/files/firebird-net-provider/2.5.2/NETProvider-2.5.2-CF.7z/download" rel="noreferrer">Firebird Client v2.5.2</a>).</p></li>
  <li><p>Downloaded <strong>Firebird Embedded server</strong> (<a href="http://sourceforge.net/projects/firebird/files/firebird-win32/2.5-Release/Firebird-2.5.0.26074-0_Win32_embed.zip/download" rel="noreferrer">Firebird Embedded Server v2.5.0</a>).</p></li>
  <li><p>Added a <strong>reference to FirebirdSql.Data.FirebirdClient.dll</strong> to my project.</p></li>
  <li><p>Extracted and Copied <strong>fbembed.dll file to my application's</strong> directory.</p></li>
  <li><p>Added my FDB file <strong>"TEST.FDB" to my application's</strong> directory.</p></li>
  <li><p>Added "<strong>using FirebirdSql.Data.FirebirdClient;</strong>" statement.</p></li>
  </ol>
  
  <p>So far so good (I suppose)...</p>
  
  <p>Now when I try to <strong>connect to my FDB file</strong> using the following code:</p>
  
  <pre><code>    FbConnection con = new FbConnection("User=SYSDBA;" + "Password=masterkey;" + "Database=TEST.FDB;" + "DataSource=127.0.0.1;" + "Port=3050;" + "Dialect=3;" + "Charset=UTF8;");
      try  {
               con.Open();
           }
      catch (Exception ex) 
           {
              MessageBox.Show(ex.ToString());
           }
  </code></pre>
  
  <p>I always get the messagebox which means the code is not connecting to my DB file properly.
  am I doing something wrong? I'm really still noob with C# and I have no idea how to do this or fix it and I hope someone will help me with this.</p>
  
  <p>thanks :)</p>
  
  <p>EDIT: here is what I get in the exception:</p>
  
  <blockquote>
    <p>FirebirdSql.Data.FirebirdClient.FbException
    (0x80004005): Unable to complete
    network request to host "127.0.0.1".
    ---> Unable to complete network request to host "127.0.0.1".    at
    FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
    at
    FirebirdSql.Data.FirebirdClient.FbConnectionPool.Create()
    at
    FirebirdSql.Data.FirebirdClient.FbConnectionPool.CheckOut()
    at
    FirebirdSql.Data.FirebirdClient.FbConnection.Open()
    at
    fbTestApp.Form1.button1_Click(Object
    sender, EventArgs e) in C:\Documents
    and Settings\ermac\My Documents\Visual
    Studio
    2010\Projects\fbTestApp\fbTestApp\Form1.cs:line
    25</p>
  </blockquote>