Subject Re: [IBO] Dataset Lookup
Author Jason Wharton
> At 07:48 31.07.2003, you wrote:
> > > (I think he called it horizontal dataset refinement), where if you
> > >
> > > Has this ever been put in?
> >
> >Yes, this has been complete for some time now.
>
> So is this used automagically if I use Locate?

You need to configure it. Search the archives and the tech info sheets on
how to set it up.

In short, you add a setting to your OrderingLinks property which tells how
it should work.

> > > Also, is there some better way to jump to a certain record of which
the PK
> > > value is know then to use the Locate method?
> >
> >The Locate() method optimizes where it can so chances are if you are
> >locating based on the primary key then it will be as fast as if you are
> >using a bookmark. If you want ease of use and to be sure to using the
> >fastest way just use bookmarks.
>
> My problem with this is I looked at all the Methods of TIB_Query down to
> the Statement ancestor.
> I can't find a GotoBookmark method anywhere.
> Am I just blind or looking in the wrong place?

Just use the Bookmark property. It delivers you a hex representation of the
buffer value depending on what your keylinks columns are.

> Is there any information how to manually construct a bookmark if you just
> know the PK?

Yes, it is possible to do this using the KeyFields property. You can plug in
column values and then grab out the corresponding bookmark value. KeyFields
is similar to the Fields array only it is for your keylinks (usually primary
key) columns. I can't remember off the top of my head what the bookmark
string is but I think it is obtained by doing KeyFields.RowData (once the
KeyFields.ByName( 'xxxx' ).Asxxxx have been plugged in.

HTH,
Jason Wharton
http://www.ibobjects.com