Why can't execute absolutePage of RecordSet?

E

Edward

My os is windows 2000 Server,database is Access2000.I want to use RecordSet.AbsolutePage,but I can't run it! Why?
Code is follows:

Dim sSQL,currentPage,rowCount,i
currentPage=Request.QueryString("currentPage")
If currentPage="" then
currentPage=1
end if

Set cnn = Server.CreateObject("ADODB.Connection")
Set rst = Server.CreateObject("ADODB.RecordSet")
cnn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("admin/main.mdb")
cnn.Open

rst.CursorType=adOpenStatic
rst.PageSize=5
sSQL="Select * from letter where Status=1 order by SuggestionID desc"
rst.Open sSQL,cnn

rst.AbsolutePage=CInt(currentPage) ' line 83,error in this line
rowCout=0

When I run it,it raise follows error:

ADODB.Recordset error '800a0cb3'
Object or provider can't execute needed operate

/letterbox.asp£¬line 83

How to solve this problem?

Thanks in advance!
 
A

Aaron Bertrand - MVP

http://www.aspfaq.com/2120
http://www.aspfaq.com/2320

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/




My os is windows 2000 Server,database is Access2000.I want to use
RecordSet.AbsolutePage,but I can't run it! Why?
Code is follows:

Dim sSQL,currentPage,rowCount,i
currentPage=Request.QueryString("currentPage")
If currentPage="" then
currentPage=1
end if

Set cnn = Server.CreateObject("ADODB.Connection")
Set rst = Server.CreateObject("ADODB.RecordSet")
cnn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & Server.MapPath("admin/main.mdb")
cnn.Open

rst.CursorType=adOpenStatic
rst.PageSize=5
sSQL="Select * from letter where Status=1 order by SuggestionID
desc"
rst.Open sSQL,cnn

rst.AbsolutePage=CInt(currentPage) ' line 83,error in this
line
rowCout=0

When I run it,it raise follows error:

ADODB.Recordset error '800a0cb3'
Object or provider can't execute needed operate

/letterbox.asp£¬line 83

How to solve this problem?

Thanks in advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top