469,342 Members | 5,285 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,342 developers. It's quick & easy.

Why can't execute absolutePage of RecordSet?

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!



Jul 19 '05 #1
1 6079
http://www.aspfaq.com/2120
http://www.aspfaq.com/2320

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


"Edward" <zh*****@neusoft.com> wrote in message
news:Od**************@TK2MSFTNGP12.phx.gbl...
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!


Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Navin Kulshreshtha | last post: by
4 posts views Thread by Thomas Scheiderich | last post: by
18 posts views Thread by Darryl Kerkeslager | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.