title: ADODB Connection String not working in Classic ASP
body: <p>I have been developing an ASP.NET application. I want to integrate Classic ASP file(.asp) in this application.</p>
  
  <p>In a .asp file I have to fetch data from SQL Server 2008 r2 database.
  For this I have created db and rs object. I have passed ConnectionString in db.Open function. But I am getting no output for this code.</p>
  
  <p>Following is my code</p>
  
  <pre><code>   set db = Server.CreateObject("ADODB.Connection")
  
     db.Open "provider=SQLNCLI10;Data Source=HP-PC\SQLEXPRESS;Initial Catalog=RMToday;Persist             Security Info=True;"
  
  
     set rs = Server.CreateObject("ADODB.Recordset")
  
     rs.Open "select * from RMToday.dbo.[Current]",db
  
     if not rs.EOF Then
       response.Write(rs("DayClosed"))
     End If 
  </code></pre>
  
  <p>I have searched in stackoverflow.com and got some related questions, answer.</p>
  
  <p>I can not understand the wrong in this code.</p>
  
  <p>Thanks in advance</p>