View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0013395||FPC||Database||public||2009-03-25 10:40||2011-10-15 18:03|
|Reporter||Leslie Kaye||Assigned To||Joost van der Sluis|
|Summary||0013395: TField lookups error with multiple key fields|
|Description||With a lookup field (FieldKind = fkLookup) multiple errors occur if there is more than one field listed in TField.KeyFields and TField.LookupKeyFields|
"Invalid variant operation Array of Variant = Array of Variant"
"Field not found" in dataset when it does.
Different errors may be achieved by setting TField.LookupCache to True or to False
|Additional Information||I attach a test project|
Dbf1 has fields containing 2 char language IDs, month numbers and the month name according to the language and month number
Dbf2 contains a lookup field MONTH_NA which should return the month name according to language and month number data fields in Dbf2
Setting the lookup keys either to language or to month number works as expected. Set both language and month number as keys then errors occur.
I notice in the TLookupList implementation there are instances of:
V1 = V2
to test equality of variants .. the code should be
(I am not sure whether this works where the variant is an array maybe you have to test each element)
|Tags||No tags attached.|
|Fixed in Revision|
DBLookupFieldTest.ZIP (166,737 bytes)
||This is a TDbf-bug, which is a separate package which we only re-distribute. You can find the package here: http://tdbf.sourceforge.net/|
TDBF has been abandoned by its maintainer and is no longer supported by the FPC team (the unit is still available, but with a deprecation warning explaining the situation).
You may be able to get further help from other users on the tdbf forum at http://sourceforge.net/projects/tdbf/forums/forum/107245
|2009-03-25 10:40||Leslie Kaye||New Issue|
|2009-03-25 10:40||Leslie Kaye||File Added: DBLookupFieldTest.ZIP|
|2009-03-25 11:01||Jonas Maebe||FPCOldBugId||=> 0|
|2009-03-25 11:01||Jonas Maebe||Category||FCL => Database Components|
|2009-03-25 11:01||Jonas Maebe||Status||new => assigned|
|2009-03-25 11:01||Jonas Maebe||Assigned To||=> Joost van der Sluis|
|2009-04-09 22:51||Joost van der Sluis||Note Added: 0026684|
|2011-10-15 18:03||Florian||Status||assigned => resolved|
|2011-10-15 18:03||Florian||Resolution||open => suspended|
|2011-10-15 18:03||Florian||Note Added: 0053017|