Current Recordset does not support bookmarks. This may be a limitation of the provider or of the sel

J

Johnfli

ADODB.Recordset error '800a0cb3'
Current Recordset does not support bookmarks. This may be a limitation of
the provider or of the selected cursortype.

I am moving my webserver from NT4 using SQL to win2003 using SQL 2003

I get the above error when my asp page does teh line:

Rs.absolutepage = intCurrentPage
I tested teh value of intCurrent page and teh value is 1.


Any ideas? The .asp Page works perfectly fine on teh old machine.
 
M

Mike Brind

Johnfli said:
ADODB.Recordset error '800a0cb3'
Current Recordset does not support bookmarks. This may be a limitation of
the provider or of the selected cursortype.

I am moving my webserver from NT4 using SQL to win2003 using SQL 2003

I get the above error when my asp page does teh line:

Rs.absolutepage = intCurrentPage
I tested teh value of intCurrent page and teh value is 1.


Any ideas? The .asp Page works perfectly fine on teh old machine.

http://www.aspfaq.com/show.asp?id=2320

adovbs.inc?
 
B

Bob Barrows [MVP]

Johnfli said:
ADODB.Recordset error '800a0cb3'
Current Recordset does not support bookmarks. This may be a
limitation of the provider or of the selected cursortype.

I am moving my webserver from NT4 using SQL to win2003 using SQL 2003

No such thing. Do you mean SQL 2000 or SQL 2005?
I get the above error when my asp page does teh line:

Rs.absolutepage = intCurrentPage
I tested teh value of intCurrent page and teh value is 1.


Any ideas? The .asp Page works perfectly fine on teh old machine.

Well, you probably have a different version of ADO (MDAC) on the new machine
whose OLE DB provider is more strict about the cursor types that support
bookmarks.

1. Do you really need to support AbsolutePage? If you are using a recordset
for paging, you may want to consider one of the more efficient methods
talked about in this article: http://www.aspfaq.com/show.asp?id=2120

2. If you are really married to utilizing the absolutepage property this
way, we are going to need more information:
-what provder are you using?
-what cursortype are you requesting for the recordset?
-what cursortype are you actually getting? (do a response.write
rs.cursortype after opening the recordset)

Bob Barrows
 
B

Bob Barrows [MVP]

Well, if you look that up at
http://msdn.microsoft.com/library/en-us/ado270/htm/mdcstcursortypeenum.asp,
you will see that 0 translates to adOpenForwardOnly, which according to the
chart on this page:
http://msdn.microsoft.com/library/en-us/ado270/htm/mdprocursortype.asp, does
not support adBookmark (bookmarks). So this explains why absolutepage is not
working. What now needs to be explained is why you are getting a
forward-only cursor, which I suspect is not intended (and which the same
exact code on your NT4 box was not returning). In order to answer that
question, YOU need to provide the answer to ALL the other questions I asked
in my previous reply. (why does it feel like I'm pulling teeth? I asked 4
questions in my previous post and you answered one of them. Don't you want
to get this resolved today? :) )

In addition, you will need to show the code used to open your connection
(including the connection string - you can replace the username and password
with xxxx if you aren't using integrated authentication to connect) and the
code used to create and open the recordset. If you're dealing with a lot of
user inputs and a long sql statement, you can snip that out because it
probably isn't relevant.

Bob Barrows
 
J

Johnfli

I am useing teh SQL that is on my SBS 2003 box, so I magine it is SQL 2000
As far as needing to use absolute page, it is teh only item I know how to
use. I am not a web creater full time. I just support what we have and
create new when needed. IF there is a better way, I am more than happy to
do it that way.
Here is the code you requested.:

objConn.Open "Provider=SQLOLEDB.1;Password=xxxxx;Persist Security
Info=True;User ID=xxxx;Initial Catalog=TTSI;Data Source=MAILSVR"

if txtPONumber = "" then

strFBSQL = "SELECT * FROM TTSITracing WHERE " & strWhichCompany & " = "
& strUserID & " AND (" & tPickupDelivery & ">= " & "'" & eDate & "'" & " AND
" & tPickupDelivery & "<= " & "'" & sDate & "'" & ") ORDER BY " &
strSortOrder & " ;"

else

strFBSQL = "SELECT * FROM TTSITracing WHERE " & strWhichCompany & " = "
& strUserID & " AND ConsigneeRefNum like '%" & txtPONumber & "%' AND (" &
tPickupDelivery & ">= " & "'" & eDate & "'" & " AND " & tPickupDelivery &
"<= " & "'" & sDate & "'" & ") ORDER BY " & strSortOrder & " ;"

end if

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



rsFBills.Open strFBSQL, objConn, 3,3

If not (rsFBills.BOF and rsFBills.EOF) then

' response.write "Hello" '

rsFBills.PageSize = 20

intPageCount = rsFBills.PageCount


If Request("PageNo")= "" or Request("PageNo") =0 or Request("PageNo") < 1
Then

intCurrentPage = 1

Else

intCurrentPage = Request("PageNo")

' To define last page in case user enters a larger page count

If CInt(Request("PageNo")) > intPageCount Then

intCurrentPage = intPageCount

End If


End If

response.write rsFBills.cursortype

rsFBills.absolutepage = intCurrentPage
 
B

Bob Barrows [MVP]

Johnfli said:
I am useing teh SQL that is on my SBS 2003 box, so I magine it is SQL
2000
:)
"magine"? The version is extremely relevant to this issue. The version of
SQL Server does not depend on the box on which it is running. Do you have
Query Analyzer (part of the SQL Server client tools)? If so, run this sql
statement:
SELECT 'SQL Server '
+ CAST(SERVERPROPERTY('productversion') AS VARCHAR) + ' - '
+ CAST(SERVERPROPERTY('productlevel') AS VARCHAR) + ' ('
+ CAST(SERVERPROPERTY('edition') AS VARCHAR) + ')'


If not, open a recordset on it in an asp page and look at the result.
As far as needing to use absolute page, it is teh only item I
know how to use. I am not a web creater full time. I just support
what we have and create new when needed.

OK, I've had experience with wearing several hats, so i know what you're
going through.
IF there is a better way,
I am more than happy to do it that way.

Well, I pointed you at an article that showed a few better ways. the rest is
up to you :)
Here is the code you requested.:

objConn.Open "Provider=SQLOLEDB.1;Password=xxxxx;Persist Security
Info=True;User ID=xxxx;Initial Catalog=TTSI;Data Source=MAILSVR"
rsFBills.Open strFBSQL, objConn, 3,3
response.write rsFBills.cursortype
OK, so you requested a static cursor (3=adOpenStatic), and according to your
last post, you actually got a forward-only cursor. I have no explanation for
this behavior if you are using SQL 2000. It should work as you've written
it. If you actually have SQL 2005, then there may be an issue with the
SQLOLEDB provider. You may have better luck with the new SQLNCLI provider.
here is an example adapted from SQL BOL:
con.ConnectionString = "Provider=SQLNCLI;" _
& "Server = MAILSVR ;" _
& "Database=TTSI;" _
& "User ID=xxxx;" _
& "DataTypeCompatibility=80;" _
& "Password=xxxxx;"

Of course, regardless of the version, you can force ADO to construct a
static cursor by specifying a client-side cursor:

set rsFBills=CreateObject("adodb.recordset")
rsFBills.cursorlocation = 3 ' adUseClient
rsFBills.Open strFBSQL, objConn, 3,3,1

Bob Barrows
 
J

Johnfli

It replied with : SQL Server 8.00.760 - SP3 (Standard Edition)

I haven't had a chance to go through and read the articls you suggested, but
I plan to.

I thank you for your assistance so far. I will dive back into this again on
Monday.
 
B

Bob Barrows [MVP]

Johnfli said:
It replied with : SQL Server 8.00.760 - SP3 (Standard Edition)
OK, this is SQL 2000 with SP3. Are you aware that SP4 has been released? It
fixes some problems invoving interactions with W2003. I highly recommend you
download and apply that service pack.

Bob Barrows
 

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

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top