Recordset error

Results 1 to 2 of 2

Thread: Recordset error

  1. #1
    GY Guest

    Default Recordset error

    I am trying to page through results of a search using links, but I get this error:<BR>Error Type:<BR>ADODB.Recordset (0x800A0BB9)<BR>Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.<BR>/Asp_Work/searchresult.asp, line 71<BR>Line 71: recsetDB.Open MySql, connDB, adOpenKeyset, adLockOptimistic<BR><BR>In the beginning of my code, I defined the different constants instead of including I am using a Select Case statement to determine what SQL statement is used:<BR>Select Case BySearch<BR>Case "Caption"<BR>If Stext = "*" Then<BR>MySql = "Select * From CaseTable Order By Caption"<BR>Else<BR>MySql = "Select * From CaseTable Where Caption Like &#039;% %" & Stext & "%%&#039; Order By Caption"<BR>End If<BR>Case "CaseNumber"<BR>If Stext = "*" Then<BR>MySql = "Select * From CaseTable Order By CaseNumber"<BR>Else<BR>MySql = "Select * From CaseTable Where CaseNumber =&#039;" & Stext & "&#039;"<BR>End If<BR>End Select<BR><BR>When displaying my paging links, I use this code:<BR>For i = 1 to recsetDB.RecordCount Step pageSize <BR>Response.Write("&#060;a href=""")<BR>Response.Write request("script_name") & "?start=" & i<BR>Response.Write("""&#062;")<BR>Response.Write i & " - "<BR>If i + pageSize &#060;= recsetDB.RecordCount then<BR>Response.Write i + (pageSize) - 1<BR>Else<BR>Response.Write recsetDB.RecordCount<BR>End If<BR>Response.Write("&#060;/a&#062;")<BR>Response.Write(" ")<BR>Next <BR><BR>If I run the code w/out the Select Case statement and just use one SQL statement, it I can page fine. When using the Select Case statement, I get the appropriate number of results and links, but get the error when clicking on any of the links.

  2. #2
    Tim Snyder Guest

    Default RE: Recordset error

    What error?

Posting Permissions

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