title: Why am I getting unexpected error in ado with classic asp?
body: <p>I have this (I have a connection above all this not shown):</p>
  
  <pre><code>Set cmd = Server.CreateObject("ADODB.Command")
  Set cmd.ActiveConnection = conn
  cmd.CommandType = 1
  cmd.Parameters.Append .CreateParameter("LASTNAME", 200, 1, 50, "JONES")
  cmd.CommandText = "select * from employees where lastname = ?"
  cmd.Prepared = True
  Set rs = cmd.Execute
  </code></pre>
  
  <p>As soon as I execute I get:</p>
  
  <pre><code>    Active Server Pages error 'ASP 0115' 
      Unexpected error 
  
      myasppage.asp 
  
      A trappable error (C0000005) occurred in an external object. 
  The script cannot continue running.
  </code></pre>
  
  <p>I can't see what I am doing wrong.  I tried various things such as remove prepared, but it has no effect (tried trial and error commenting out various above to no avail).  </p>
  
  <p>Oracle if it matters.</p>
  
  <p>Thanks for help.  </p>