very very odd....

Results 1 to 2 of 2

Thread: very very odd....

  1. #1
    Join Date
    Dec 1969

    Default very very odd....

    Hi,<BR><BR>the following code causes an error on one page, but not another :-S (two different sites tested on)....on the page I get an error, the error is <BR><BR>Error Type:<BR>ADODB.Recordset (0x800A0E79)<BR>Operation is not allowed when the object is open.<BR>/dumbonion/CM_FILE_LIST.asp, line 162<BR><BR>--------------<BR><BR>If Request("Page") = "" Then<BR> CurrentPage = 1<BR>Else<BR> CurrentPage = CInt(Request("Page"))<BR>End If<BR><BR>Alternator = 0<BR><BR>SQL = "Select * From pagecontroller ORDER BY id DESC"<BR><BR>Set RS_DISPLAY_LIST = CMPRO_CONN.Execute( SQL )<BR><BR> RS_DISPLAY_LIST.CursorLocation = adUseClient<BR> RS_DISPLAY_LIST.PageSize = PageSize<BR> <BR> PageCount = RS.PageCount<BR> <BR> If 1 &#062; CurrentPage Then CurrentPage = 1<BR> If CurrentPage &#062; PageCount Then CurrentPage = PageCount<BR><BR> RS_DISPLAY_LIST.AbsolutePage = CurrentPage <BR><BR> Do While RS.AbsolutePage = CurrentPage And Not RS_DISPLAY_LIST.EOF<BR><BR>am I just tired and missing some syntax?

  2. #2
    Join Date
    Dec 1969

    Default Not odd...

    First of all: WHAT LINE IS THE ERROR ON???<BR><BR>But I&#039;m going to try using my crystal ball this time.<BR><BR>I&#039;m *GUESSING* it is on<BR> RS_DISPLAY_LIST.CursorLocation = adUseClient<BR><BR>In which case it&#039;s the right message!<BR><BR><BR><BR>*** QUOTE ***<BR>This property is read/write on a Connection or a closed Recordset, and [hl="yellow"]read-only on an open Recordset.[/hl]<BR>*** END QUOTE ***<BR><BR>So I don&#039;t believe you about the code on your two pages being the same.<BR><BR>You will need to change this:<BR> Set RS_DISPLAY_LIST = CMPRO_CONN.Execute( SQL )<BR> RS_DISPLAY_LIST.CursorLocation = adUseClient<BR><BR>to this:<BR> Set RS_DISPLAY_LIST = Server.CreateObject("ADODB.Recordset")<BR> RS_DISPLAY_LIST.CursorLocation = adUseClient<BR> RS_DISPLAY_LIST.Open SQL, CMPRO_CONN<BR><BR>I imagine.<BR><BR><BR><BR>

Posting Permissions

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