Re: ADO Recordset's object method Open

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Stephen Howe (stephenPOINThoweATtns-globalPOINTcom)
Date: 04/06/04


Date: Tue, 6 Apr 2004 12:21:30 +0100


> What is a cause of this error?

Did you read the Microsoft ADO documentaton on Bookmarks ?

It says here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdprobookmark.asp

this:

>>>>>>>>>>
Use the Bookmark property to save the position of the current record and
return to that record at any time. Bookmarks are available only in Recordset
objects that support bookmark functionality.
>>>>>>>>>>

to which I have a few questions for you:

Question 1: What happens if your recordset does not support bookmarks?
Bookmarks are only available for certain combinations of
CursorTypes,CursoroLocations.LockTypes.
Do

if (recs ->Supports(adBookmark))
{
        // record Bookmark, it is supported
}

Question 2: What happens if testtable is empty? Then there is no current
record. So there is nothing to bookmark

SH