Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 09:52 AM
Edward
Guest
 
Posts: n/a
Default 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!





  #2  
Old July 19th, 2005, 09:52 AM
Aaron Bertrand - MVP
Guest
 
Posts: n/a
Default Re: Why can't execute absolutePage of RecordSet?

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

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




"Edward" <zhangsc@neusoft.com> wrote in message
news:OdK8JaBuDHA.1060@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!






 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles