View Issue Details

IDProjectCategoryView StatusLast Update
0006620JEDI VCL00 JVCL Componentspublic2019-03-11 17:06
ReporterdougwoodrowAssigned Toobones 
Status resolvedResolutionfixed 
Product Version3.48 
Target VersionFixed in VersionDaily / GIT 
Summary0006620: TJvDBLookupCombo.IgnoreCase property is applied to the key lookup
DescriptionAccording to the wiki the TJvDBLookupCombo.IgnoreCase property specifies the case-sensitivity of the incremental search:

In the current implementation this property is applied to the key LookupField as well as to the LookupDisplay field.

In my opinion this is a bug, as it can cause the wrong record to be displayed when the key field is case-sensitive.

For instance, with the following example table, a single character key field 'a' will be incorrectly displayed as "Item one" instead of "Item three" when the IgnoreCase property is set to True.

| A |Item one |
| B |Item two |
| a |Item three |
Additional InformationExample (quick-and-dirty) fix:

function TJvLookupControl.Locate(const SearchField: TField;
  const AValue: string; Exact: Boolean): Boolean;
  IsDisplayField: Boolean;
  CaseSensitive: Boolean;
  FLocate.IndexSwitch := FIndexSwitch;
  Result := False;
    if not ValueIsEmpty(AValue) and (SearchField <> nil) then
      IsDisplayField := (SearchField = FDisplayField);
      if IsDisplayField then
        // respect lookup property
        CaseSensitive := not IgnoreCase
        // not display, so this is the key field, do a case-sensitive locate
        CaseSensitive := True;
      Result := FLocate.Locate(SearchField.FieldName, AValue, Exact, CaseSensitive, True, RightTrimmedLookup);
      if Result then
        if IsDisplayField then
          FValue := FKeyField.AsString;
TagsNo tags attached.



2018-07-18 16:03

administrator   ~0021543

Could you check if the issue is still present in the latest GIT content? If yes, please provide the zipped sources of an application showing this.

2018-07-19 18:05 (1,756 bytes)

2018-07-19 18:08


Capture1.jpg (39,438 bytes)
Capture1.jpg (39,438 bytes)


2018-07-19 18:14

reporter   ~0021562

Hi Olivier, thanks for looking into this.
I've attached an application illustrating the problem (

Note that the actual value of the FDisplayField that is displayed depends on what record is currently slected when the locate() is performed.
So when IgnoreCase is true, either the 'a' lookup or the 'A' lookup may be wrong, as shown in Capture1.jpg.


2019-03-09 18:19

reporter   ~0021625

I took the liberty to create a pull request for it:


2019-03-10 10:41

reporter   ~0021627

Replaced the pull request with this one, as my old one contained unrelated modifications as well (Git is still new for me):


2019-03-11 17:06

administrator   ~0021634

Thanks, this is now fixed in GIT

Issue History

Date Modified Username Field Change
2018-02-19 22:14 dougwoodrow New Issue
2018-07-18 16:03 obones Note Added: 0021543
2018-07-18 16:03 obones Status new => feedback
2018-07-19 18:05 dougwoodrow File Added:
2018-07-19 18:08 dougwoodrow File Added: Capture1.jpg
2018-07-19 18:14 dougwoodrow Note Added: 0021562
2019-03-09 18:19 mh Note Added: 0021625
2019-03-10 10:41 mh Note Added: 0021627
2019-03-11 17:06 obones Note Added: 0021634
2019-03-11 17:06 obones Status feedback => resolved
2019-03-11 17:06 obones Fixed in Version => Daily / GIT
2019-03-11 17:06 obones Resolution open => fixed
2019-03-11 17:06 obones Assigned To => obones