PDA

View Full Version : Recordset Bookmarks


robsecord
09-11-2003, 04:42 AM
I was just wondering if DiscountASP.net Supports RecordSet Bookmarks?

When I try to use certain methods of a RecordSet object like:

rs.PageSize
rs.PageCount
rs.AbsolutePage

I get the following error:

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

Is this a limitation of the CursorType? Or are recordset bookmarks not supported?


R. Secord, B.Sc., CTO MorphixTech

robsecord
09-13-2003, 07:20 AM
Well basically, I wanted to display a list of products, but page by page.. I wanted to use the built-in PageSize functions for the RecordSet, but I kept getting an error..

I have since worked around it using logic only, but it would be much easier (and I suppose faster) if I could use the built in ones.. my code looked somewhat like this:

Set cn = Server.CreateObject( "ADODB.Connection" )
cn.Open strConn
Set rs = cn.Execute("Select * From Products Where Category = '" & sCategory & "' And SubCategory = '" & sSubCategory & "' Order By Title")

rs.PageSize = 10

The above line is where it gives the error I mentioned earlier..


R. Secord, B.Sc., CTO MorphixTech

bruce
09-13-2003, 09:10 AM
>I was just wondering if DiscountASP.net Supports RecordSet Bookmarks?

I think so. It is standard ADO stuff.

Please post code.

[b]quote:Originally posted by robsecord

I was just wondering if DiscountASP.net Supports RecordSet Bookmarks?

When I try to use certain methods of a RecordSet object like:

rs.PageSize
rs.PageCount
rs.AbsolutePage

I get the following error:

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

Is this a limitation of the CursorType? Or are recordset bookmarks not supported?


R. Secord, B.Sc., CTO MorphixTech
</blockquote id="quote"></font id="quote">

steurm
09-15-2003, 03:27 AM
I think you should first set the Cursorlocation of the connection to adUseClient (a constant with value 3 for the Cursorlocation) before opening your connection. (I'm not sure if you can set it afterwards)
[quote]
....(regularconnectionsettings)
conn.CursorLocation=adUseClient
conn.Open
</CODE>

(I don't know if you include a page with ado constants. If not, put a 3 instead of the adUseClient.)

When opening your recordset with this connection, you should be able to use bookmarks etc.

--
Steurm
www.steurm.net