title: Connecting to an oracle database in C# .Net
body: <p>Hi I use the following code to connect to an orace database in Visual Studio 2008 and it is falling over with the exception of ServerVersion threw an invalid operation exception at line 3:</p>
  
  <pre><code>m_strConnectionString = Settings.GetMandatoryConfig("databases", "SourceDB");
  m_strQueryTerminator = Settings.GetConfig("databases", "QueryTerminator");
  m_odbConn = new OleDbConnection(m_strConnectionString);
  m_sql = new SQL(DatabaseType.AnsiSQL, false);
  </code></pre>
  
  <p>m_strConnectionString is a valid TNS names connection string and is as follows:</p>
  
  <blockquote>
    <p>Provider=MSDAORA;Data Source=myDS;User
    ID=myID;Password=myPW</p>
  </blockquote>
  
  <p>This has previously worked and is using an IIS web server to host the application.  I recently converted it from .Net 1.1 (VS 2003) to .Net 3.5/2 (VS 2008) and can't get it working as yet in VS 2008.</p>
  
  <p>Thanks</p>