title: Classic ASP DB opening function does not work
body: <p>I have transferred a Classic asp site running on windows server 2003 to windows server 2008 but suddenly the below code has stopped working.</p>
  
  <pre><code>Const connStr_FC08 = "Provider=SQLNCLI10;Server=DS-47500;Database=TestDB;Uid=TestLogin;Pwd=test;Network=dbmssocn;"
  
  Function connDB(OpenDB)
      DIM conn
      SET conn = Server.CreateObject("ADODB.Connection")
      conn.open = connStr_FC08
      If OpenDB = "Y" Then conn.open
      connDB = conn
  End Function
  
  dim cn, cmd
  cn = connDB("Y")
  response.Write(cn.state)
  </code></pre>
  
  <p>This returns the below error</p>
  
  <pre><code>Microsoft VBScript runtime error '800a01a8' 
  
  Object required: 'Provider=SQLNCLI10.1'
  </code></pre>
  
  <p>This happens on the below line</p>
  
  <pre><code>response.write(cn.state)
  </code></pre>
  
  <p>Thanks
  Chris</p>