By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

recordset bookmark problem

P: n/a

I am fairly new to Access and I have a problem trying to use bookmarks with
a recordset.

I have a recordset dimensioned as,

Dim rstFoodDesc As ADODB.Recordset ' recordset
Dim bMark As Variant ' variable to store bookmark

I open the recordset with the statements,

Set rstFoodDesc = New ADODB.Recordset
rstFoodDesc.Open "FOOD_DES", CurrentProject.Connection, adOpenDynamic,
adLockOptimistic

"FOOD_DES" is a table in my database

I can navigate and access the data in the table with no trouble. When I try
to set a bookmark using,

bMark = rstFoodDesc.Bookmark

I get a run time error 3251: "Current Recordset does not support bookmarks.
This may be a limitation of the provider or of the selected cursor type."

Help files say that for "Recordset objects based entirely on Microsoft Jet
tables, the value of the Bookmarkable property is True, and you can use
bookmarks." My recordset is based on Access tables and I expected bookmarks
to be available. What am I doing wrong?

I am using Access 2000 and Windows 2000.

Thanks in advance for any help.

Paul Core
co******@aol.com
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Paul:

The CurrentProject.Connection property returns the ADO Connection object for
the current database. The default data provider for the ADO Connection
object is the Microsoft OLE DB Provider for ODBC. My understanding is that
this is the default because not all databases currently support OLE DB
providers.

The Connection object has a Provider property where you can change this
default. However, in your case, the default data provider does not support
the Bookmark property for Dynamic or Forward-Only cursors. It does however
support the Bookmark Property (read/write) for Static and Keyset cursors.
Therefore, you will need to change that parameter of your recordset's Open
method, or alternatively, set the Provider property for your connection.
For example:

rstFoodDesc.Open "FOOD_DES", CurrentProject.Connection, adOpenKeyset,
adLockOptimistic

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
<co******@aol.com> wrote in message
news:42**********@spool9-west.superfeed.net...

I am fairly new to Access and I have a problem trying to use bookmarks with
a recordset.

I have a recordset dimensioned as,

Dim rstFoodDesc As ADODB.Recordset ' recordset
Dim bMark As Variant ' variable to store bookmark

I open the recordset with the statements,

Set rstFoodDesc = New ADODB.Recordset
rstFoodDesc.Open "FOOD_DES", CurrentProject.Connection, adOpenDynamic,
adLockOptimistic

"FOOD_DES" is a table in my database

I can navigate and access the data in the table with no trouble. When I try
to set a bookmark using,

bMark = rstFoodDesc.Bookmark

I get a run time error 3251: "Current Recordset does not support bookmarks.
This may be a limitation of the provider or of the selected cursor type."

Help files say that for "Recordset objects based entirely on Microsoft Jet
tables, the value of the Bookmarkable property is True, and you can use
bookmarks." My recordset is based on Access tables and I expected bookmarks
to be available. What am I doing wrong?

I am using Access 2000 and Windows 2000.

Thanks in advance for any help.

Paul Core
co******@aol.com
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Nov 13 '05 #2

P: n/a
On Wed, 22 Jun 2005, I wrote that I was unable to use bookmarks with a
recordset opened using:
Set rstFoodDesc = New ADODB.Recordset
rstFoodDesc.Open "FOOD_DES", CurrentProject.Connection, adOpenDynamic,
adLockOptimistic
On Wed, 22 Jun 2005, David Lloyd replied, suggesting I use
rstFoodDesc.Open "FOOD_DES", CurrentProject.Connection, adOpenKeyset,
adLockOptimistic


Sorry it has taken me a while to respond. I waited until I had time to check
out everything, including that the bookmarks function properly. I work alone
as a hobby and it took a while to check everything. With this one change,
everything suddenly started working. I can set and restore bookmarks.

My version of Access does not have any help files for ADO Recordsets (the
topics show up, but no help is available when I click on them). I looked
through the available help files for a description of the adOpenKeyset
cursor type. Finding nothing, I went to the Access 2000 Developer's
Handbook, Access 2000 VBA Handbook, and a couple of other printed
references. Again, I found nothing.

Your explanation of what caused my problem helped a LOT! But I was hoping to
get a better understanding of the choices for cursor types and the
ramifications of each choice. Do you (or anyone else) know of any good
references (on-line or printed) dealing with this, and related, topics on
opening recordsets?

Thanks again for getting me moving on my project!

Paul Core
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.