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

recordset bookmark problem


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

Similar topics

2
by: Harold | last post by:
Sat I have a customers table with the fields CustomerID and Customer and I use the recordset.addnew method to add a new record to the table. What is the best way to get the CustomerID of the new...
1
by: Ian | last post by:
I want to open a form at a particular record, but I think I'm running into problems because the recordsource query is executing asynchronously. In the form's open event I use...
0
by: deko | last post by:
For some reason this is eluding me... I have a subform datasheet that contains appointments imported form Outlook. If the appointment is associated with an Entity in the database, it will have a...
8
by: cannen | last post by:
Hi all, Access Newbie here with I'm sure is an easily answered question. I have a form that has a tab control with a listbox called lstVacations. What iam attempting to do is click a record in...
5
by: Tom van Stiphout | last post by:
Hi all, I'm seeing a weird problem I'm thinking might be due to corruption. What do you think? Here is the relevant code, which is in a standard module, called from subfrmDetail's...
3
by: Wayne Wengert | last post by:
In VB6/ADO I used to use the code below to put all the records that did not have a valid email address into an array which I used later to print mailing labels. I am not aware of a NET equivalent....
5
by: GoalieGW | last post by:
The below code is not giving me the desired result. I am trying to compare the same field on two seperate records. One being the current record, the other being the day before. The code works to...
7
by: marmottedodue | last post by:
Hello, I'm trying to debug an access project in which two kind of recordset are used: ADODB.recordset and DAO.recordset. I'm trying to set the whole project on DAO.recordset, but the following...
3
ADezii
by: ADezii | last post by:
Last Tip, we demonstrated the technique for retrieving data from a DAO Recordset, and placing it into a 2-dimensional Array using the GetRows() Method. This week, we will cover the same exact Method...
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:
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.