|
|
|
|
|
| | |
|
Active Server Pages ASP control controls class classes module script Scripts applet CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Paging through recordset |
From: |
Rick King |
Date: |
7/21/2000 12:40:26 AM |
IP: |
24.69.138.210 |
I get the following error:
ADODB.Recordset error 800a0bcd
Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record.
line 623
As we know, it might be pointing at the wrong line, but the actual error
should be near the line 623. Anyways, this is line 623:
howmanyfields=RS16.fields.count -1
What im trying to do is display 10 records per page. The first page
with 10 records displays correctly. When i click on the page numbers to
jump to the next set of records I get the error. So basically i can
only view the first page of records.
Anyways, heres the code:
<%
Dim Conn16
Dim RS16
Dim Cat
Dim mypage
Dim mypagesize
Dim pagesize
Dim SQLtemp
Dim Query16
Dim maxpages
Dim maxrecs
Dim howmanyrecs
Dim howmanyfields
Dim i
Dim fieldvalue
Dim pad
Dim scriptname
Dim counterstart
Dim counterend
Dim counter
Dim ref
Get the parameter from the URL
Cat = Trim(Request.QueryString("Cat"))
Open the connection to the database
Set Conn16 = Server.CreateObject("ADODB.Connection")
Conn16.Open "Catalog"
Set RS16 = Server.CreateObject("ADODB.Recordset")
mypage=request("whichpage")
If mypage="" then
mypage=1
end if
mypagesize=request("pagesize")
If mypagesize="" then
mypagesize=10
end if
Query16=request("sqlQuery")
IF Query16="" THEN
Query16=SQLtemp
END IF
RS16.cachesize=1
RS16.pagesize=mypagesize
maxrecs = mypagesize
Create the query to extract records
Query16 = |
Follow Up - Re: Paging through recordset - Miss Wawa 8/1/2000 1:18:03 AM
|
|

|
|
|
|
|
|
|
|
|
|