Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AbsolutePage causing errors

1 view
Skip to first unread message

Les Juby

unread,
Oct 14, 2009, 7:11:13 PM10/14/09
to
Hi

While setting up a pagination system, the line defining the
AbsolutePage value is returning HTTP 500 errors.

The abbreviated code is.....


-------< CLIP >-------

set rstemp=conntemp.execute(SQL)

rstemp.PageSize = MaxRecsPage
TotalPages = rstemp.PageCount
rstemp.AbsolutePage = RecSetPage

-------< /CLIP >-------

The variable RecSetPage has an integer value of 2 or 3

Any suggestions please.

.les.

Bob Barrows

unread,
Oct 14, 2009, 7:34:43 PM10/14/09
to
Les Juby wrote:
> Hi
>
> While setting up a pagination system, the line defining the
> AbsolutePage value is returning HTTP 500 errors.
>

Well, you're not seeing the real errors then.
http://www.aspfaq.com/show.asp?id=2109

Let us know what the real error is :-)
--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


Les Juby

unread,
Oct 16, 2009, 2:00:56 AM10/16/09
to
Unfortunately, the only variable I can control is the "Show Friedly
Error Messages" which is always unchecked. Our support guys at
eInSites Hosting maintain that all the other server configurations
covered in the article at ASPFAQ are configured correctly.

Other errors in other ASP application do report with a good level of
debug detail so maybe it is only this Absolutepage error that is
befuddling ASP.????

Given that is maybe the case, and more error detail cannot be produced
by the server, would you perhaps have any other tips.

thanks

.les.

Dan

unread,
Oct 16, 2009, 4:58:04 AM10/16/09
to

"Les Juby" <les...@anti-spam.iafrica.com> wrote in message
news:4ad65974.16096750@localhost...

AFAIK you need to have your recordset opening with an explicit client side
cursor in order to get the paging to work. eg.

set rstemp = Server.CreateObject("ADODB.Recordset")
With rstemp
.CursorLocation = 3
.Open SQL, conntemp
End With

--
Dan

Bob Barrows

unread,
Oct 16, 2009, 7:09:05 AM10/16/09
to
Les Juby wrote:
> Unfortunately, the only variable I can control is the "Show Friedly
> Error Messages" which is always unchecked. Our support guys at
> eInSites Hosting maintain that all the other server configurations
> covered in the article at ASPFAQ are configured correctly.
>
> Other errors in other ASP application do report with a good level of
> debug detail so maybe it is only this Absolutepage error that is
> befuddling ASP.????
I suspect that something else is causing that error. If AbsolutePage was
raising an error, it would be transmitted ... unless you have an On Error
Resume Next line in your code ... if you do, you should of course comment it
out.

Without an error message telling you which line is causing the error, what
has made you zero in on the AbsolutePage line?

What Dan has said is not quite true. A server-side snapshot, dynamic or
keyset cursor will also support bookmarks which sill allow AbsolutePage to
work. The problem of course is that using the wrong cursor typ will cause
ADO to raise an explicit error which will get passed to the browser as long
as the server and client settings allow it to.

Les Juby

unread,
Oct 16, 2009, 8:29:11 AM10/16/09
to

>Without an error message telling you which line is causing the error, what
>has made you zero in on the AbsolutePage line?


The commenting out of the line: rstemp.AbsolutePage makes the error
disappear. Funnily enough, the PageSize line creates no problem....

''rstemp.AbsolutePage = RecSetPage


set rstemp=conntemp.execute(SQL)
rstemp.PageSize = MaxRecsPage

>What Dan has said is not quite true. A server-side snapshot, dynamic or

>keyset cursor will also support bookmarks which sill allow AbsolutePage to
>work. The problem of course is that using the wrong cursor typ will cause
>ADO to raise an explicit error which will get passed to the browser as long
>as the server and client settings allow it to.

Hmmmm. I'm not defining any cursor type at all. Could that be it
maybe.????

.les.


o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
Les Juby les...@anti-spam.iafrica.com
Webpro Internet - - - Prosoft Microsystems
Durban, KwaZulu-Natal, South Africa
P.O.Box 35243, Northway 4065, South Africa
Tel: +27 31 563-8344 Fax: +27 31 564-4928
o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
(you *do* know to take "anti-spam" out the address....?

Bob Barrows

unread,
Oct 16, 2009, 8:50:45 AM10/16/09
to
Les Juby wrote:
>> Without an error message telling you which line is causing the
>> error, what has made you zero in on the AbsolutePage line?
>
>
> The commenting out of the line: rstemp.AbsolutePage makes the error
> disappear. Funnily enough, the PageSize line creates no problem....
>
> ''rstemp.AbsolutePage = RecSetPage
> set rstemp=conntemp.execute(SQL)
> rstemp.PageSize = MaxRecsPage
>
>> What Dan has said is not quite true. A server-side snapshot, dynamic
>> or keyset cursor will also support bookmarks which sill allow
>> AbsolutePage to work. The problem of course is that using the wrong
>> cursor typ will cause ADO to raise an explicit error which will get
>> passed to the browser as long as the server and client settings
>> allow it to.
>
> Hmmmm. I'm not defining any cursor type at all. Could that be it
> maybe.????
>
Yes. The default cursor type is server-side forward-only, unless you
specify a client-side cursorlocation (adUseClient) in which case the
cursor type is always static (adOpenStatic).

Hmm, you seem to be attempting to set the page before opening the
recordset. This of course is not allowed. But it SHOULD raise an error
that tells you more than the HTTP 500 error page ...

So, you should be doing this:

set rstemp=createobject("adodb.recordset")
rstemp.cursorlocation=3 'adUseClient
rstemp.open SQL,conntemp,,,1 '1=adCmdText
rstemp.PageSize = MaxRecsPage
rstemp.AbsolutePage = RecSetPage

--
HTH,
Bob Barrows


Les Juby

unread,
Oct 18, 2009, 6:51:25 PM10/18/09
to

>Les Juby wrote:
>>> Without an error message telling you which line is causing the
>>> error, what has made you zero in on the AbsolutePage line?
>>
>>
>> The commenting out of the line: rstemp.AbsolutePage makes the error
>> disappear. Funnily enough, the PageSize line creates no problem....
>>
>> ''rstemp.AbsolutePage = RecSetPage
>> set rstemp=conntemp.execute(SQL)
>> rstemp.PageSize = MaxRecsPage
>>
>>> What Dan has said is not quite true. A server-side snapshot, dynamic
>>> or keyset cursor will also support bookmarks which sill allow
>>> AbsolutePage to work. The problem of course is that using the wrong
>>> cursor typ will cause ADO to raise an explicit error which will get
>>> passed to the browser as long as the server and client settings
>>> allow it to.
>>
>> Hmmmm. I'm not defining any cursor type at all. Could that be it
>> maybe.????
>>

On Fri, 16 Oct 2009 08:50:45 -0400, "Bob Barrows"
<reb0...@NOyahoo.SPAMcom> wrote:


>Yes. The default cursor type is server-side forward-only, unless you
>specify a client-side cursorlocation (adUseClient) in which case the
>cursor type is always static (adOpenStatic).
>
>Hmm, you seem to be attempting to set the page before opening the
>recordset. This of course is not allowed. But it SHOULD raise an error
>that tells you more than the HTTP 500 error page ...
>
>So, you should be doing this:
>
>set rstemp=createobject("adodb.recordset")
>rstemp.cursorlocation=3 'adUseClient
>rstemp.open SQL,conntemp,,,1 '1=adCmdText
>rstemp.PageSize = MaxRecsPage
>rstemp.AbsolutePage = RecSetPage

Thanks Bob - Right on the money there.

Pagination now working superbly.!

I need a drink.......

0 new messages