Subject RE: [IBO] Re: Query.Locate -with OrderingItems & OrderingLinks
Author Michael Horne
Jason,

TIB_Query.Locate is a valid method, if it cannot be used with
IB_Query, why is it there.

But anyway, what I am trying to do, is to position to the
first occurrence of a value in a list of records. Is
there something else I should be using instead of Locate?

Thanks
Michael L. Horne


> -----Original Message-----
> From: Jason Wharton [mailto:jwharton@...]
> Sent: Monday, November 17, 2003 4:10 PM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] Re: Query.Locate -with OrderingItems & OrderingLinks
>
>
> Michael,
>
> If you are wanting to move through records that meet a particular locate
> criteria, here's how you do it.
>
> First off, you must be using TDataset based components (I think)
> since this
> is a BDE emulation thing. You set the Filtered property to false and put a
> Filter in the Filter property. Then you can use the methods FindFirst,
> FindNext, FindPrior and FindLast. What these will do is navigate to the
> records that meet the filter criteria among the records of the dataset in
> general.
>
> Hope this helps!
>
> Give it a try and let me know how it goes.
>
> Jason Wharton
>
> ----- Original Message -----
> From: "Michael Horne" <guardian@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Thursday, November 13, 2003 12:02 AM
> Subject: RE: [IBO] Re: Query.Locate -with OrderingItems & OrderingLinks
>
>
> > Using First before the locate doesn't help.
> >
> > However some additional info on what is happening:
> > 1. It seems that the record that is located is always
> > the same no matter which order the file is in.
> > 2. That record is the first with the code when the
> > file is retrieved unordered.
> >
> > This seems to indicate that when orderinglinks are
> > used to determine the order of the records. "Locate"
> > must use a method to like:
> > select first 1 * from netcomin
> > where nc_reference = 'GARY'
> > to determine the record ID of the record to position
> > to then scans the keys to find the record. When I
> > issue the SQL statement above it goes to the record
> > that locate is finding.
> >
> > Is there some setting I am missing??????????
> >
> > Thanks
> > Michael L. Horne
>
>
>
> __________________________________________________________________
> _________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> __________________________________________________________________
> _________
> http://www.ibobjects.com - your IBO community resource for Tech
> Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>