Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread loPartialKey and Locate by multiple fields
Sat, Nov 18 2006 8:21 AMPermanent Link

Max Terentiev
Hello,

I notice strange problem:

If I use locate for searching partial string in single field all works fine !

But if try to write this:

Opts<<loPartialKey;
Variant locvalues[2];
locvalues[0]=Variant("berli");
locvalues[1]=Variant("smi");
MyTable->Locate("City;Name",VarArrayOf(locvalues,1).Opts);

It's not works ! If more than one field used in Locate - loPartialKey no longer works.
In example above Locate can search record only if both string is completed ("berlin" and
"smith").

It's Locate() limitation or bug in DBIsam ?
Sat, Nov 18 2006 10:58 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Max


Its a limitation on using multi field keys, not specific to dbisam.

Roy Lambert
Sat, Nov 18 2006 11:17 AMPermanent Link

Max Terentiev
Hi Robert,

It's possible to avoid this limitation (by adding some special indexes for searching
fields, etc) ?

Or TQuery is only solution ?

Thanx.
Sat, Nov 18 2006 11:24 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Max


Go for a query

Roy Lambert
Sat, Nov 18 2006 3:00 PMPermanent Link

"Robert"

"Max Terentiev" <maxterentiev@mail.ru> wrote in message
news:AFDDE94D-3F40-42A0-AE72-1CE618996D57@news.elevatesoft.com...
> Hi Robert,
>
> It's possible to avoid this limitation (by adding some special indexes for
> searching
> fields, etc) ?
>
> Or TQuery is only solution ?
>

Remember that a filter in DBISAM is basically a WHERE query condition, so
you might be able to do a filter instead of a locate. Of course, just as in
a query, you'll get all the rows that match your filter, nota s single row
as in locate. Disclaimer: I don't know if you can use text search in a
filter, I have never used it.

Robert

Sun, Nov 19 2006 5:06 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Robert


Good point - you CAN use TEXTSEARCH in a filter - forgot that one

Roy Lambert
Mon, Nov 20 2006 5:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Max,

<< It's not works ! If more than one field used in Locate - loPartialKey no
longer works.In example above Locate can search record only if both string
is completed ("berlin" and"smith").

It's Locate() limitation or bug in DBIsam ? >>

It's the way Locate works - partial keys only work on the last field used in
the Locate, not on all fields used in the Locate.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image