Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Delphi XE Version

Vern Baker
2010-12-30
2013-09-23
<< < 1 2 (Page 2 of 2)
  • LS Ploeger
    LS Ploeger
    2013-05-31

    Indeed, there is a bug for string filters. Below, the check on Param^.Args[1] was missing in dbf_prsdef (the lines containing the comment starting with "// lsp" were added):

    procedure _StringVariable(Param: PExpressionRec);
    var
      length: integer;
    begin
      if Assigned(Param^.Args[1]) then // lsp, not set for ExprRec^.ExprWord.FixedLen<0!!!!
        length := PInteger(Param^.Args[1])^
      else
        length := -1;
      if length = -1 then
        length := StrLen(PPAnsiChar(Param^.Args[0])^); // Was PPChar
      Param^.Res.Append(PPAnsiChar(Param^.Args[0])^, length); // Was PPChar
    end;
    

    Furthermore, the management of TStringFieldVar.RawStringField was incorrect. To force that FFieldVal has a value assigned I modified dbf_parser.pas for TDbfParser.HandleUnknownVariable:

        ftString:
          begin
            TempFieldVar := TStringFieldVar.Create(FieldInfo, TDbfFile(FDbfFile));
            TempFieldVar.FExprWord := DefineStringVariable(VarName, TempFieldVar.FieldVal);
            TStringFieldVar(TempFieldVar).FRawStringField := not FRawStringFields; // lsp, force update !!!
            TStringFieldVar(TempFieldVar).RawStringField := FRawStringFields;
          end;
    

    I hope this helps.

     
  • eSzeL
    eSzeL
    2013-09-23

    I'd like to ask where can I find the latest version, maybe fully compatible with XE2 containing all the patches?

    THANK YOU!

     
<< < 1 2 (Page 2 of 2)