title: Classic ASP and SQL Server Express 2005
body: <p>Below is my simple asp code that I am using to insert some data to the SQL Server database. It gives the below error. Could someone please have a look and let me know the error with this code?</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Address Book Insertion&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
  &lt;%
  
      set connection=Server.CreateObject("ADODB.Connection")
      connection.Open "Provider=SQLOLEDB;Server=charithj-pc;Integrated Security=SSPI;Initial Catalog=AddressDB;"
  
      cmd =       "INSERT INTO AddressBook (FirstName, Surname, Address) VALUES ('"
      cmd = cmd &amp; Request("FirstName") &amp; "','"
      cmd = cmd &amp; Request("Surname")   &amp; "','" 
      cmd = cmd &amp; Request("Address")   &amp; "')"
  
      Response.Write(cmd)
  
      on error resume next
      connection.Execute cmd
      if err &lt;&gt; 0 then
          Response.Write("Insertion failed")
      else 
          Response.Write("Insertion successful")
      end if
      connection.close
  %&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <blockquote>
    <p>The website cannot display the page </p>
    
    <p>HTTP 500  </p>
    
    <p>Most likely causes:</p>
    
    <p>•The website is under maintenance.</p>
    
    <p>•The website has a programming error.</p>
  </blockquote>