Re: ADODB.Recordset.Bookmark
- From: "Richard M. Hartman" <hartman@xxxxxxxxxxxx>
- Date: Wed, 28 Nov 2007 15:27:18 -0800
Thanks for the info. I'm not really a beginner developer, just new to ADO
(been stuck using DAO for ever). I know about bookmarks _in_general_, but
can't seem to make 'em work for me with ADO.
I changed the cursor type to static, and bookmarks work, but now I can't
update the recordset. The first cursortype I tried (as I mentioned) was
dynamic (adOpenDynamic, to be precise). I'll look into the Supported()
function.
--
-Richard M. Hartman
hartman@xxxxxxxxxxxx
186,000 mi/sec: not just a good idea, it's the LAW!
"Ralph" <nt_consulting64@xxxxxxxxx> wrote in message
news:OIrkgMWMIHA.484@xxxxxxxxxxxxxxxxxxxxxxx
the
"Richard M. Hartman" <hartman@xxxxxxxxxxxx> wrote in message
news:e8nFUeVMIHA.280@xxxxxxxxxxxxxxxxxxxxxxx
How do you use this? I am trying, but getting an error that says that
therecordset does not support them and that it may be the fault of either
haveprovider or the cursortype. What I have not seen is anything telling me
what cursortype I should be using. The provider is MS SQL Server. I
fishtried the default cursortype and adOpenDynamic. Is there a method oroffer?
property of the connection or recordset that can tell me whether the
provider supports bookmarks? Are there any other tips that y'all can
TIA
In the spirit of teaching you how to fish, instead of just giving you a
<g>type
http://www.netzone.ch/caspdoc/Ch11_ADO101.html
To find additional values (if available) open the Object Browser [F2] and
search for CursorOptionEnum in the ADO library. After awhile of playing
around you will quickly find out what's available, under what conditions.
The Supports() member is handy during development where you can simply
it in the intermediate window.is
adOpenDynamic - usually supports bookmarks (it supports all navigation) so
you might want to check out the provider or client/server side cursor.
=======
Admittedly most documentation and tutorials seem to give Bookmarks a
mystical quality.
The Recordset.Bookmark is a binary string which indicates the current
record. It is unique for every record in any given Recordset. While there
some rhyme 'n reason to the value - best to not go there. <g> Just thinkof
them as "Tags".the
The most common use of a Bookmark is to set the current record to a
variable, then after you have moved to another record you can always make
the original record the current one by setting it back to the captured
value.
Another use comes from when you updated a recordset. The bookmark holds
last/current record that has been 'touched'. So if you capture thebookmark
in an update event you can later go back to updated record, again, usingthe
saved bookmark.also
You might also capture the bookmarks for interesting records while looping
through a recordset, store them in an array, then come back and do some
additional massage on those records.
Not only can you use Bookmarks directly but other methods and controls
use them. This is why Bookmarks, Find, and controls like a Grid are so
closely associated.
hth
-ralph
.
- Follow-Ups:
- Re: ADODB.Recordset.Bookmark
- From: Ralph
- Re: ADODB.Recordset.Bookmark
- References:
- ADODB.Recordset.Bookmark
- From: Richard M. Hartman
- Re: ADODB.Recordset.Bookmark
- From: Ralph
- ADODB.Recordset.Bookmark
- Prev by Date: Re: ADODB.Recordset.Bookmark
- Next by Date: Re: ADODB.Recordset.Bookmark
- Previous by thread: Re: ADODB.Recordset.Bookmark
- Next by thread: Re: ADODB.Recordset.Bookmark
- Index(es):
Relevant Pages
|