Error with rs.CursorLocation and Paging though my database

Results 1 to 4 of 4

Thread: Error with rs.CursorLocation and Paging though my database

  1. #1
    Scott Cate Guest

    Default Error with rs.CursorLocation and Paging though my database

    So I have this search form that works awesome but if it&#039s finds to much the browser takes to long to display the findings so paging is perfect for me.<BR><BR>I&#039ve narrowed the following error down to <BR>rs.CurstorLocation = adUseClient<BR>I&#039m sure that the ADOVBS.INC is set to 3 (Thanks gail for the Idea) and the file is being included properyl.<BR>-----------------------------<BR>ADODB.Recordset error &#039 800a0bb9&#039 <BR><BR>The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. <BR>-----------------------------<BR>If I rem the rs.CursorLocation line I get a page with all my variables working. I can get rs.RecordCount = 18 and page 1 of 3 but no articles display. I think it&#039s because with the cursorlocation the AbsolutePage is uselessf<BR><BR><BR>Following is a code snippit - Thanks for any help<BR>-----------------------------<BR>session("PageSize") = request("PageSize")<BR>iPageSize = session("PageSize")<BR>if request("page") ="" Then<BR> strPageCount = 1<BR>Else<BR> strPageCount = Cint(request("page"))<BR>End If &#039request("page") ="" Then<BR><BR>Set connect = Server.CreateObject("ADODB.Connection")<BR>Set rsArticleList = Server.CreateObject("ADODB.Recordset")<BR>Connect. open "MediKB"<BR>rsArticleList.CursorLocation = adUseClient<BR>rsArticleList.PageSize = iPageSize<BR>rsArticleList.open sql, connect, adOpenKeySet<BR><BR>strPageCount = rsArticleList.PageCount<BR>if 1 > strPageCurrent then strPageCurrent = 1<BR>-----------------------------<BR><BR>Thanks for any advice.<BR>if strPageCurrent > strPageCount then strPageCurrent = strPageCount<BR><BR>rsArticleList.AbsolutePage = strPageCurrent

  2. #2
    Scott Cate Guest

    Default RE: Error with rs.CursorLocation and Paging though my database

    I&#039ve narrowed it down to an SQL problem. I simplified to ASP to bare bones and this is what I came up with. My original Search page wits the following SQL and works fine.<BR>------------------------------------<BR> sql = "Select * from qryArticle where (InStr([Title],&#039" & varSearch1 & "&#039)&#060;>0"<BR> sql = sql & " or InStr([KeyWords],&#039" & varSearch1 & "&#039)&#060;>0"<BR> sql = sql & " or InStr([ArticleBody],&#039" & varSearch1 & "&#039)&#060;>0)"<BR>------------------------------------<BR>Now I&#039ve stripped the SQL and narrowed the error down to the ArticleBody, which is a memo field.<BR><BR>My ? - It was working before I added the paging and I&#039ve double checked that nothing else has changed. If someone is willing to help I&#039ll email both pages for comparison.<BR><BR>Thanks for any time you might spend on this project for me.

  3. #3
    Scott Cate Guest

    Default SOLVED

    It was my SQL

  4. #4
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: SOLVED

    :):) It usually is... :):)<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
  •