title: Connect to an Oracle database
body: <p>I'm trying to connect to an Oracle database but when the the code is executing the line:</p>
  
  <pre><code>con = new OracleConnection(oradb);
  </code></pre>
  
  <p>It gives this error. "The program can't start because oraons.dll is missing from your computer. Try reinstalling the program to fix this problem." I installed the ODP for .net on my computer already from the following site <a href="http://www.oracle.com/technetwork/topics/dotnet/index-085163.html" rel="noreferrer">http://www.oracle.com/technetwork/topics/dotnet/index-085163.html</a> and referenced the Oracle.DataAccess.</p>
  
  <p>I also checked the folder that was installed and I can see the oraons dll in the folder. Here's the code:</p>
  
  <pre><code>class OracleDatabase
  {
      OracleConnection con;
      public void ConnectToOracleDb()
      {
          string oradb = getConnectionString("host", 1521, "sid", "user", "pass");
  
          try
          {
              con = new OracleConnection(oradb);
              con.Open();
              Console.WriteLine("Connected to Oracle" + con.ServerVersion);
          }
          catch
          {
              Console.WriteLine("Could not connect to FLX");
          }
  
      }
  
      private static string getConnectionString(string databaseIP, int databasePort, string databaseSID, string databaseUN, string databasePW)
      {
          return string.Format(
              "Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = {0})(PORT = {1}))(CONNECT_DATA =(SID = {2})));" +
              "Persist Security Info=True;User ID={3};Password={4}",
              databaseIP, databasePort, databaseSID, databaseUN, databasePW
          );
      }
  }
  </code></pre>
  
  <p>Why can't I connect any suggestions?   </p>