Mika Koistinen

Forum Replies Created

Viewing 1 reply thread
  • Author
    Posts
    • #57317
      Mika Koistinen
      Participant

      Actually solution was more simple than I tought.

      TCaseInsentiviveKbmMemtable = class (TkbmMemTable)
          function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant; overload; override;
       end;
      ...
      function TCaseInsentiviveKbmMemtable.Lookup(const KeyFields: string; const KeyValues: Variant;
        const ResultFields: string): Variant;
      var
        options: TLocateOptions;
      begin
        options := [loCaseInsensitive];
        Result:=Lookup(KeyFields,KeyValues,ResultFields,options);
      end;
    • #57316
      Mika Koistinen
      Participant

      Thanks For this.
      Actually at that point primary customer using that updated data to match case. But now we got two more cases.
      My code is like this

       
      fProdLookup := tKbmMemTable.create(self);
      q.sql.Text := 'select number,name from products';
      q.UniDirectional := true;
      q.open;
      fProdlookup.LoadFromDataSet(q, [mtcpoStructure,mtcpoProperties]);
      fProdLookup.addIndex('iNumber','number',[ixCaseInsensitive]);
      fProdLookup.indexName := 'iNumber';
      

      But still case casesensitive lookups.

Viewing 1 reply thread