|
| Applylocate |
 |
Sun, 06 Apr 2008 18:41:36 -040 |
Hi All
Is it possible to search for two fields(or even more) using applylocate and if
so can somebody please show me. l've tried various combinations and allways
comes up with invalid fields,etc
|
| Post Reply
|
| Re: Applylocate |
 |
Mon, 7 Apr 2008 00:22:16 -0400 |
In article <SPWvedDmIHA.468@news-server>, rob@calculation.com.au says...
> Hi All
> Is it possible to search for two fields(or even more) using applylocate
If there is an index on the first field, why not using setRange() on it,
and then (when the rowset is restricted to just a few rows) applyLocate
() on the second field.
If there is _no_ index on the first field, why not using a filter, then
applyLocate() on the second field.
Jean-Pierre Martel, editor
The dBASE Developers Bulletin
|
| Post Reply
|
| Re: Applylocate |
 |
Mon, 07 Apr 2008 05:48:45 -040 |
Jean-Pierre Martel Wrote:
> In article <SPWvedDmIHA.468@news-server>, rob@calculation.com.au
says...
> > Hi All
> > Is it possible to search for two fields(or even more) using
applylocate
>
> If there is an index on the first field, why not using setRange() on it,
> and then (when the rowset is restricted to just a few rows) applyLocate
> () on the second field.
>
> If there is _no_ index on the first field, why not using a filter, then
> applyLocate() on the second field.
>
> Jean-Pierre Martel, editor
> The dBASE Developers Bulletin
> Blue Star dBASE Plus Core Concepts Graduate
Thank you Jean-Pierre
l will give it a try this way
|
| Post Reply
|
| Re: Applylocate |
 |
Mon, 7 Apr 2008 08:30:31 -0400 |
In article <0RyPSSJmIHA.1372@news-server>, rob@calculation.com.au
says...
>
> Thank you Jean-Pierre
> l will give it a try this way
That being said, the fastest way to access a row would be to create a
compound index...
index on Field1+Field2 tag IndexName
...for example:
use MyTable exclusive
index on left(FamilyName,10)+left(FirstName,5) tag Name
use
...and to use the rowset findkey() method to go straight to that record.
That would be instantaneous.
Jean-Pierre Martel, editor
The dBASE Developers Bulletin
|
| Post Reply
|
|
|
|
|
|
|
|
|
|