Re: ADO Bookmark status



Bob,

Sorry if I offended. Was just trying define the context of the question.
Didn't want it to get more involved than it had to be.

The deleted record might be one condition. I'm sure there are others. Let's
just say I want to be sure in a particular method that no matter what state
the recordset is in when you enter it that if I ask for a bookmark I can be
sure it is currently good to use.

The current bookmark ultimately comes from ADO using my code something like
below:

_variant_t bookmark=_RecordsetPtr->Bookmark;

Since this doesn't generate an error condition I need to interrogate the
variant bookmark to determine if it's okay.

For example: if I wanted to know if the variant was empty I could use:
if (bookmark==VT_EMPTY) .....

Does this help clarify?

Thanks, Neil

PS: Thanks for all your help getting me to the ADO C++ info. I've got most
of it working now. I think the rest are just loose ends to clean up.

"Bob Barrows [MVP]" wrote:

Neil B wrote:
Bob,

I think this is a very simple question.


Really? I guess I'd better get out of the way and let the more intelligent
people take over here.

I get a book mark in a variant using C++ code like below.

Oh! You're the "Neil B" that was posting all the C++ questions here! OK, the
talk about macros made me suspect you were an Office VBA user.


_variant_t bookmark;
bookmark=GetAdoRecordsetPtr()->Bookmark;

Now I want to know if the bookmark is any good. So I would use code
something like this:

if (bookmark==VALID) ........
or
if (IsBookmarkValid(bookmark)) .....

I just can't find what "VALID" should be or what is the right
equivalent method for "IsBookMarkValid()".


Actually, I don't understand what would make a bookmark "invalid" in your
eyes. Are you talking about the possibility that the record may have been
deleted between the time you obtained the bookmark and the time you attempt
to use it?

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"



.



Relevant Pages

  • Re: ADO Bookmark status
    ... Neil B wrote: ... Now I want to know if the bookmark is any good. ... Microsoft MVP - ASP/ASP.NET ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)
  • Re: ADO Bookmark status
    ... Neil B wrote: ... I can't think of any situation where the bookmark would no longer ... Since this doesn't generate an error condition I need to interrogate ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)