title: Database Read Error, Classic ASP
body: <p>When connecting to my database, I'm getting a error code of 500 from my server which references me to <a href="http://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8" rel="nofollow">THIS LINK</a>, but I know the asp is enabled on our server because the code executes fine until it gets to the line executing  <code>Recordset.Open SQL,Connection.</code> To ensure I'm establishing a successful database connection, I write a message stating "Connected OK" which works fine until the Recordset.Open statement is added (tested by removing Recordset and it works fine). The ASP file is being called via a AJAX request in my React.JS app which sits in a HTML module on DotNetNuke, and that works no problem as well. Our servers are running IIS 8 with SQL Server 2008 installed. </p>
  
  <p>Update - Error Code From Server:</p>
  
  <pre class="lang-none prettyprint-override"><code>Conversion_failed_when_converting_the_varchar_value_'2520-031'_to_data_type_int. 80 - ::1 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/50.0.2661.94+Safari/537.36 http://localhost/Test.aspx 500 0 0 24
  </code></pre>
  
  <p>Edit: I know my SQL statement saying "table" is wrong, I just didn't feel comfortable posting the actual table name on here. </p>
  
  <p>Any suggestions to improve this code are welcomed to (or an example using ASP.Net as well).</p>
  
  <p>ASP Code:</p>
  
  <pre class="lang-vb prettyprint-override"><code>&lt;%
  
  line = request.querystring("q")
  Response.Write("Hello" &amp; line)
  
  Dim conn
  Dim Recordset
  DIM SQL 
  
  SQL = "SELECT * from table"
  
  Set conn = Server.CreateObject("ADODB.Connection")
  Set Recordset = Server.CreateObject("ADODB.Recordset")
  
  conn.Open "Provider=SQLOLEDB; Data Source = ****; Initial Catalog = ****; User Id = ****; Password= ****"
  Recordset.Open SQL,Connection
  
  If conn.errors.count = 0 Then
  
      Response.Write "Connected OK"
  
  End If
  
  conn.close
  
  %&gt;
  </code></pre>