Disconnecting a RecordSet - Urgent (aren't th

Results 1 to 2 of 2

Thread: Disconnecting a RecordSet - Urgent (aren't th

  1. #1
    Two-Bits Guest

    Default Disconnecting a RecordSet - Urgent (aren't th

    &nbsp; &nbsp; &nbsp; I just rewrote an entire web app to make use of disconnected recordsets (recordsets whose active db connections have been severed to improve server performance) as well as other things. But on the line where I actually sever the connection, I get an error stating that the operation is not allowed when the object is open (the recordset). Well I&#039;m certainly not going to close my recordset first to appease the run-time engine, that would defeat the purpose! Here is the ASP Function code:<BR><BR>Function getDRS(sql)<BR>&nbsp; &nbsp; &nbsp; Dim rs_temp<BR>&nbsp; &nbsp; &nbsp; Set rs_temp = Server.CreateObject("ADODB.RecordSet")<BR>&nbsp; &nbsp; &nbsp; rs_temp.open sql, conn, adOpenStatic<BR>&nbsp; &nbsp; &nbsp; Set rs_temp.ActiveConnection = Nothing &#039; error here<BR>&nbsp; &nbsp; &nbsp; Set getDRS = rs_temp<BR>&nbsp; &nbsp; &nbsp; Set rs_temp = Nothing<BR>End Function<BR><BR>adovbs.inc is included and the conn object does exist. I&#039;m completely stumped, any ideas? - Two-Bits

  2. #2
    Join Date
    Dec 1969

    Default RE: Disconnecting a RecordSet - Urgent (aren'

    You need to set the CursorLocation property of the recordset to adUseClient.<BR><BR>Dunc

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts