Subject | Re: [IBO] Re: Query.Locate -with OrderingItems & OrderingLinks |
---|---|
Author | Jason Wharton |
Post date | 2003-11-17T21:10:25Z |
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
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