?
Solved

Problem with AbsolutePage

Posted on 2005-04-10
9
Medium Priority
?
455 Views
Last Modified: 2008-02-01
For some reason, when sp_Get_SearchResults_sss_PriceOnly is run, the Absolute page works just fine but when sp_Get_SearchResults_sss is run, I get the error :

ADODB.Recordset error '800a0cb3'

Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype


The Code
--------------------

If Request.Form("search") = "1" Then
      If strkeywords = "" Then
            strSQL = "sp_Get_SearchResults_Autos_PriceOnly"
            strSQL = strSQL & " @StartPrice = " & Cdbl(strstartprice) & ","
            strSQL = strSQL & " @EndPrice = " & Cdbl(strendprice)
            response.write strSQL
      else
            strSQL = "sp_Get_SearchResults_Autos"
            strSQL = strSQL & " @Keywords = '" & strkeywords & "',"
            strSQL = strSQL & " @StartPrice = " & Cdbl(strstartprice) & ","
            strSQL = strSQL & " @EndPrice = " & Cdbl(strendprice)
            response.write strSQL
      End If
End If


Here is where the AbsolutePage is called in which the line # of the error is:
---------------------------------------------------------------------------------------

      If Request.QueryString("action") <> "search" Then
            ...some code
      else
                    - This is the code that is called to open the connection and results.  Again, this works fine for the first stored proc
                       and does not cause the AbsolutePage error below
            Query.Open strSQL, objConnection, adOpenStatic, adLockReadOnly, adCmdText
      End If


If NOT Query.EOF Then

                  Query.PageSize = 30
                  '### Note: on initial run of search, intp_sss will be null
                  If intp_sss <> "" Then
                        intp_sss = CInt(intp_sss)
                  Else
                  '### On intial search, sets intp_auto to 1
                        intp_sss = 1
                  End If

                  '### Set the absolutePage so ASP knows what the landing page is before showing the paging links
                  Query.AbsolutePage = intp_sss    - Error is here but this works fine for the first stored proc

... rest of code


Another note.   In my functions.asp include, I have this:
------------------------------------------------------------------

Set objConnection = Server.CreateObject("ADODB.Connection")

objConnection.Open "Provider=sqloledb;Data Source=sss;Initial Catalog=sss;User Id=sss;Password=sss;"
0
Comment
Question by:dba123
  • 5
  • 4
9 Comments
 
LVL 23

Accepted Solution

by:
Saqib Khan earned 2000 total points
ID: 13750331
Add this Right after you Create RecordSet Object

Query.CursorLocation = 3  ' adUseClient
0
 
LVL 1

Author Comment

by:dba123
ID: 13750343
wow, can you explain to me what this does....I think it worked.
0
 
LVL 1

Author Comment

by:dba123
ID: 13750381
also, why when I put Query.PageSize = 10 is my results only showing 8 on page 1 and 1 on page 2 when there are 11 records total if I run the stored proc in Query Analyzer?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:dba123
ID: 13750397
forget the last question.  But can you explain how the cursor worked...
0
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 13750449
Well for Paging you need a Special Cursor type/Location to move back and forth of your Database Table. and Above Line Does that Trick.
0
 
LVL 1

Author Comment

by:dba123
ID: 13750452
I didn't have to use that before though in one of my other apps.....???
0
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 13750510
were you doing paging before?
maybe you were using AdopenStatic iwth your Connection Object?
0
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 13750534
sorry..I mean adUseClient with Connection object
0
 
LVL 1

Author Comment

by:dba123
ID: 13750538
no, it was all the same...oh well.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question