title: Running in 64 bit mode with the 32 bit Oracle Service
body: <p>This question similar to <a href="https://stackoverflow.com/questions/16538561/run-oracle-client-in-32-bit-mode-on-a-64-bit-machine">link</a></p>
  
  <p><a href="https://stackoverflow.com/questions/23509521/running-in-64-bit-mode-with-the-32-bit-oracle-client-installed">link2</a></p>
  
  <p>I fixed this problem, but when I opened new project <strong>Wcf service library</strong>, I had that same problem, and all this changes that I had done before did't help me.</p>
  
  <p>I tried every thing that I did before and even more but it didn't helped.</p>
  
  <p>It is <strong>important</strong> to say that if I do the same in another project all work fine but in WcfServiceLibrary it doesn't work.In WcfServiceApplication it working too.</p>
  
  <p>I use VS2012(4.5) Win7 (64), my Oracle clien 32, but in other project this is not a problem.</p>
  
  <p>Maybe it because Wcf library project i don't know.
  i just buil service that save datd from database and i get error on connection to db.</p>
  
  <pre><code>Error: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.
  </code></pre>
  
  <p>My code </p>
  
  <pre><code>using (OracleConnection con = new OracleConnection())
  {
      con.ConnectionString = "User Id=zxc;Password=zxc;Data Source=NXE";
      con.Open();//here i get error
      OracleCommand cmd = new OracleCommand();
      cmd.Connection = con;
      cmd.CommandText = "select * from " + Table;
      int rowsUpdated = cmd.ExecuteNonQuery();
      OracleDataReader reader = cmd.ExecuteReader();
      String DataFromORL = "";
      int row = 0;
      while (reader.Read() &amp;&amp; row &lt; 50)
      {
          row++;
          if (reader.HasRows)
          {
              DataFromORL += reader.GetInt32(0);
          }
      }
  }
  </code></pre>