disconnected recordsets

Results 1 to 3 of 3

Thread: disconnected recordsets

  1. #1
    suresh datla Guest

    Default disconnected recordsets

    Hello,<BR> I am using disconnected recordset for my project , I am passing the values(search criterea) entered by a user to a stored procedure from where I get back a recordset and I disconnect the connection.This is Ok if I give a single seach criterea, but for 2 more it gives and error:The operation requested by the application is not allowed if the object is closed. <BR><BR>Here is my code:<BR> set rsOPD = Server.CreateObject("ADODB.recordset")<BR>rsOPD.Cu rsorLocation = adUseClient<BR>rsOPD.Open cmdOPD, , adOpenStatic, adLockReadOnly<BR>Set cmdOPD.ActiveConnection = Nothing<BR>&#039<BR>intPageSize = 10<BR>&#039rsOPD.Open cmdOPD, , adOpenStatic, adLockReadOnly<BR>if not rsOPD.bof then (This is the line no 109)<BR> intRecCount = rsOPD.recordCount<BR>end if<BR> Any suggestions would be much appreciated.<BR><BR><BR><BR>

  2. #2
    Michal M Guest

    Default RE: disconnected recordsets

    Hi suresh,<BR>I have gotten this error before when the stored procedure bombed. My suggestion is to try and print the SQL command and run it directly in query analyser. Perhaps your second search criteria is rendering the whole SQL invalid.<BR>Sorry I can&#039t be of more help.<BR>Michal M

  3. #3
    sureshdatla Guest

    Default RE: disconnected recordsets

    Thanks Micheal,at least I got the idea, I appreaciate your patience

Posting Permissions

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