Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread lookupfields
Wed, Mar 11 2009 5:19 AMPermanent Link

Wim Sterns
Hi,

I am using dbisam 3.30
I have a tdbisamtable component
In the delphi IDE I defined a lookupfield to the table defenition.
The lookupfield has to lookup the data using two fields.
So far so good, all works

Now I want to lookup using only one field and a stringvalue instead of the other field
Is this possible?


Thanks
Wim
Wed, Mar 11 2009 7:01 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Wim


Not by linking the tables in a master detail relationship but you can by making a calcfield and doing the lookup youself with .Locate()

Roy Lambert [Team Elevate]
Wed, Mar 11 2009 10:01 AMPermanent Link

Wim Sterns
Roy,

I'm already using calculated fields with findkey as a workaroud.
But a lookup field is much faster.

Any ideas ?

Wim
Wed, Mar 11 2009 10:36 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Wim


The only one that will work is to add a stringfield into the table(s) so that it can be used as part of the lookup definition. There is no way I know of to use a constant in these circumstances.

You may want to try a query as the mechanism to obtain the field - a prepared query may be faster than a FindKey since I seem to remember multi field FindKeys being a bit slow in V3 - can't remember if it was DBISAM or VarArrayOf or what.

Roy Lambert [Team Elevate]
Image