Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001678 [JEDI VCL] 00 JVCL Components minor always 2004-04-21 04:00 2004-04-22 23:39
Reporter hamilton View Status public  
Assigned To user72
Priority normal Resolution fixed  
Status resolved   Product Version
Summary 0001678: JvDBLookupCombo does not perform case insensitive search
Description I am placing a JvDBLookupCombo on a form and assigning just the datasource and datafield properties to display a fkLookup field of a ClientDataSet.

Changing the value of the IgnoreCase property has no effect.
Additional Information This behaviour is replicable using code from 2004-04-21
Tags No tags attached.
Attached Files

- Relationships

-  Notes
2004-04-22 00:04

The problem seems to be associated with TJvLocateObject.Locate, s0 could you set a breakpoint at the first line and step through the code to see where it goes south?
hamilton (reporter)
2004-04-22 07:35

Your lead turned out to be correct, the problem was in the Locate method.

The dataset field I was testing with is of type ftWideString rather than ftString that Locate expected.

The line that needs to be changed in TJvLocateObject.Locate is:
  if FLookupField.DataType <> ftString then
It needs to be replaced with:
  if not ((FLookupField.DataType = ftString) or (FLookupField.DataType = ftWideString)) then
2004-04-22 23:39

I made a slightly different change to make it easier to add new types if necessary:

function TJvLocateObject.Locate(const KeyField, KeyValue: string;
  Exact, CaseSensitive: Boolean): Boolean;
  LookupKey: TField;
  function IsStringType(FieldType:TFieldType):boolean;
    cStringTypes = [ftString, ftWideString];
    Result := FieldType in cStringTypes;

  if DataSet = nil then
    Result := False;
  LookupKey := DataSet.FieldByName(KeyField);
  FLookupField := LookupKey;
  FLookupValue := KeyValue;
  FLookupExact := Exact;
  FCaseSensitive := CaseSensitive;
  if not IsStringType(FLookupField.DataType) then
    FCaseSensitive := True;
      Result := False;
    FCaseSensitive := CaseSensitive;
  FBookmark := DataSet.GetBookmark;
      Result := MatchesLookup(FLookupField);
      if not Result then
        if UseKey then
          Result := LocateKey
          if FilterApplicable then
            Result := LocateFilter
            Result := LocateFull;
        if not Result then
          SetToBookmark(DataSet, FBookmark);
    FLookupValue := EmptyStr;
    FLookupField := nil;
    FBookmark := nil;

Updated in CVS

- Issue History
Date Modified Username Field Change
2004-04-21 04:00 hamilton New Issue
2004-04-21 04:05 hamilton Issue Monitored: hamilton
2004-04-22 00:04 user72 Note Added: 0003984
2004-04-22 00:04 user72 Status new => feedback
2004-04-22 07:35 hamilton Note Added: 0004008
2004-04-22 23:39 user72 Status feedback => resolved
2004-04-22 23:39 user72 Resolution open => fixed
2004-04-22 23:39 user72 Assigned To => user72
2004-04-22 23:39 user72 Note Added: 0004020

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker