473,395 Members | 1,726 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,395 software developers and data experts.

wrong cursor type??

i wish to show 5 datas on every page. but i cant seem to do so. below is my codes. the error msg i keep getting is "Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype."
What cursortype should i use then? pls advise.

' Retrieve Orders
sqlString = "SELECT * " &_
"FROM orders, Users, Products, ordereditems " &_
"WHERE order_userID=user_id " &_
"AND ordereditems_orderID=order_id " &_
"AND ordereditems_productID=product_id "

IF showOrders < 99 THEN
sqlString = sqlString & "AND order_status=" & showOrders
END IF
sqlString = sqlString & " ORDER BY order_entrydate DESC"

SET RS = Server.CreateObject( "ADODB.Recordset" )
RS.CursorType = adOpenStatic
IF allPages = "" THEN
RS.PageSize = 5
ELSE
RS.PageSize = 99999
END IF
RS.ActiveConnection = Conn
RS.Open sqlString

IF NOT RS.EOF THEN
RS.AbsolutePage = cINT( showPage )
END IF

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Jul 19 '05 #1
3 1570
Michelle wrote:
i wish to show 5 datas on every page. but i cant seem to do so. below
is my codes. the error msg i keep getting is "Current Recordset does
not support bookmarks. This may be a limitation of the provider or of
the selected cursortype." What cursortype should i use then? pls
advise.

' Retrieve Orders
sqlString = "SELECT * " &_
"FROM orders, Users, Products, ordereditems " &_
"WHERE order_userID=user_id " &_
"AND ordereditems_orderID=order_id " &_
"AND ordereditems_productID=product_id "

IF showOrders < 99 THEN
sqlString = sqlString & "AND order_status=" & showOrders
END IF
sqlString = sqlString & " ORDER BY order_entrydate DESC"

SET RS = Server.CreateObject( "ADODB.Recordset" )
RS.CursorType = adOpenStatic
IF allPages = "" THEN
RS.PageSize = 5
ELSE
RS.PageSize = 99999
END IF
RS.ActiveConnection = Conn
RS.Open sqlString

IF NOT RS.EOF THEN
RS.AbsolutePage = cINT( showPage )
END IF


This should work. What database are you using? And what provider are you
using to connect to it? If you are using ODBC, I suggest switching to a
native OLEDB provider if one is avaliable for your database. See
www.able-consulting.com/ado_conn.htm.

You may need to switch to a client-side cursor. Execute this line before
opening the recordset:
RS.cursorlocation=adUseClient

HTH,
Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2
i'm using oracle.
After adding the line u recommended, i another error that says there is an argument conflict..

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Jul 19 '05 #3
Michelle wrote:
i'm using oracle.
After adding the line u recommended, i another error that says there
is an argument conflict..


Do you have the ADO constants defined? See here:
http://www.aspfaq.com/show.asp?id=2112

The adUseClient constant should contain 3, so, if you don't want to use the
technique in the above article, you can either add this line:
Const adUseClient=3
or change my suggested line to:
RS.cursorlocation=3

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Doron | last post by:
hi, getting the following error when running the script below. it seems to me that the cursor is retrieving more then one value each loop. any idea how to fix this? error: ERROR at line 10:...
3
by: Csaba2000 | last post by:
I have set onmousedown to change the cursor, but this setting is ignored (IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the mouse button is released. On Opera 7.01, the setting...
10
by: bob | last post by:
Hello, I use Microsoft Visual C++ .NET (version 7.1.3088) Sometimes (with big codes?) when I get a compile error and click on the error, the cursor is placed next to the wrong piece of code. The...
10
by: Just Me | last post by:
Does Me.Cursor.Current=Cursors.WaitCursor set the current property of Me.Cursor to Cursors.WaitCursor And Me.Cursor.Current=Cursors.Default set the Me.Current property to something (default)...
4
by: _Raven | last post by:
Okay, I am playing with submitting forms with Ajax. I am trying to adapt this script to my forms: http://www.captain.at/howto-ajax-form-post-get.php I have included my code at the bottom of this...
2
by: Benzine | last post by:
I am running MS SQL 2000. I recently ran a procedure in Query Analyzer from the Master db to clear out all replication information so I could start/recreate it again. After I ran this...
0
debasisdas
by: debasisdas | last post by:
SAMPLE CODE USING RECORD =========================== declare cursor c1 is select * from dept; type drec is record (a dept.deptno%type, b dept.dname%type, c dept.loc%type); type ttype is...
0
debasisdas
by: debasisdas | last post by:
RESTRICTIONS ON CURSOR VARIABLES ================================= Currently, cursor variables are subject to the following restrictions: Cannot declare cursor variables in a package spec. ...
0
debasisdas
by: debasisdas | last post by:
Cursor Variable Returning %ROWTYPE ----------------------------------------------------------- DECLARE TYPE TmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE; tmp_cv TmpCurTyp;TYPE EmpCurTyp IS REF...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.