title: "Transaction cannot have multiple recordsets with this cursor type." Error
body: <p>I am getting the following error in my classic asp application:</p>
  
  <blockquote>
    <p>Microsoft OLE DB Provider for ODBC Drivers error '80004005' </p>
    
    <p>Transaction cannot have multiple recordsets with this cursor type.
    Change the cursor type, commit the transaction, or close one of the
    recordsets.</p>
  </blockquote>
  
  <p>i am working on migrating the code from Oracle to SQL Server 2008, and this is an issue that i keep seeing here and there, all through out the application.</p>
  
  <p>can't seem to find any fixes for it.</p>
  
  <p>this particular case in this block of code: (i changed the selects to make them shorter)</p>
  
  <pre><code>Set MyConn  = Server.CreateObject("ADODB.Connection") 
  Call OpenORPSConnect(MyConn)
  ql = "Select username from mytable"
  set rs = MyConn.Execute(sql)
  if not rs.EOF then username = rs(0)
  if username = "" then username = theUser
  rs.close()
  set rs = nothing
  
  MyConn.BeginTrans()
  
  sql = "Select someReport from MyTable"
  set rs = MyConn.Execute(sql)
  
  do while not rs.EOF
  TIMESTAMP       = rs("TIMESTAMP")
  rev      = rs("REV")
  
  select case whatChange
      case "Target date"
         sql = "Insert into " &amp; caJustTable &amp; _
                   " (TEXT, TIMESTAMP, CURRENTFLAG)" &amp; _
              " Values ( Text&amp; "','" &amp; COPY_TS &amp; "', 'Y')""
  MyConn.Execute(sql) 
      end select
  
  sql = "update table, set this to that"
  MyConn.Execute(sql) &lt;-------- error happens here sometimes....
  
  end if
  rs.movenext
  loop
  
  rs.close()
  set rs = nothing
  </code></pre>