title: SQL Server 2012 classic asp connection string
body: <p>I have a SQL Server 2012 Express installation with a new DB called <code>BRD</code> that I have created.  I have also created a test table (<code>tempDemo</code>), and a test stored procedure (<code>getStList</code>) in the <code>BRD</code> database. The stored procedure works when I run it in the query window so I believe the table and stored procedure are legit. The SQL Server is set to "SQL Server and Windows Authentication mode".</p>
  
  <p>I then attempted to create a Classic ASP page that then connected to the SQL Server using the following connection string:</p>
  
  <pre><code>objConn.ConnectionString="Provider=SQLOLEDB;Server=XPSI7\SQLEXPRESS;Database=BRD;Integrated Security=SSPI;"
  </code></pre>
  
  <p>This fails with the following message:</p>
  
  <blockquote>
    <p>"Microsoft OLE DB Provider for SQL Server error '80004005'
    Cannot open database "BRD" requested by the login. The login failed."</p>
  </blockquote>
  
  <p>When I change the database to <code>MASTER</code> instead of <code>BRD</code> the ASP page does not error out. I'm just testing the connection string by opening it and then closing it, but it appears to work.</p>
  
  <p>I've looked at the security settings for <code>MASTER</code> and <code>BRD</code> in the Object Explorer, but have failed to notice a difference. I've also looked at the <code>IIS_IUSRS</code> for the folders, but no difference either - not sure if this is necessary anyway.</p>