473,386 Members | 1,644 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 6226
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Navin Kulshreshtha | last post by:
Hi folks, I'm opening a recordset with a SQL statement and then trying to use the .RecordCount property to count the number of rows in the recordset. For some reason, it is always returning -1....
4
by: Thomas Scheiderich | last post by:
Why would you use the Recordset object over the Execute method of getting data from your Sql database. For example, I have the following: Execute Method...
3
by: sumGirl | last post by:
Hi all. I have a stored procedure on my sql server that returns a simple informtation about that tim a database was backed up. I owuld like to create an HTA that operator types can look at to make...
18
by: Darryl Kerkeslager | last post by:
When I open an ADO Recordset, I close it. However, it seems that there may be some difference in this manner of opening a Recordset: Dim rL As ADODB.Recordset Set rL = New ADODB.Recordset ...
1
by: Kevin | last post by:
Can anyone point me to a code sample where a single page in an ADO recordset is sorted independantly on a different field. Example: An ADO recordset is populated and sorted on . I need to sort...
52
by: MP | last post by:
Hi trying to begin to learn database using vb6, ado/adox, mdb format, sql (not using access...just mdb format via ado) i need to group the values of multiple fields - get their possible...
1
by: terryspanky | last post by:
----------------------Below are all the codes don't have errors---- The only problem I have is when I Delete, I'ts not deleting the subject that I click. I want to use the above codes to modify the...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
1
by: mikegolden | last post by:
An application I'm working on makes extensive use of output parameters and return values, thus forcing me to use the ADODB Command object to execute the stored procs. For recordset returning stored...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.