title: win8 x64 ,c#.net2010 ,oracle10g , office2007 , OracleConnection this Error "ORA-12154: TNS:could not resolve the connect identifier specified"?
body: <p>i've this code in project "Excel 2007 Addins" </p>
  
  <pre><code> private void ThisAddIn_Startup(object sender, System.EventArgs e)
      {
          string constring = "data source=localhost;user id=fi_archivedb;Password=fi_archivedb";
          OracleConnection con = new OracleConnection(constring);
          string sql = "select *from TBLFOLDERS"; 
          con.Open();
          OracleCommand cmd = new OracleCommand(sql, con);
  
          OracleDataReader dr = cmd.ExecuteReader();
          while (dr.Read())
              MessageBox.Show(dr[0].ToString());
      }
  </code></pre>
  
  <p>Error=: ORA-12154: TNS:could not resolve the connect identifier specified</p>
  
  <p>Also i've Same code in project windowsApplaction :</p>
  
  <pre><code>   private void Form1_Load(object sender, EventArgs e)
      {
          string constring = "data source=localhost;user id=fi_archivedb;Password=fi_archivedb";
          OracleConnection con = new OracleConnection(constring);
          string sql= "select *from TBLFOLDERS"; 
          con.Open();
          OracleCommand cmd = new OracleCommand(sql, con);
  
          OracleDataReader dr = cmd.ExecuteReader();
          while (dr.Read())
              MessageBox.Show(dr[0].ToString());
      }
  </code></pre>
  
  <p>In this project "WindowsApplaction" the code correctly without any error.</p>
  
  <p>Where's the problem?</p>
  
  <p>Why does not the code in the  project "Excel 2007 Addins"?</p>