Closed riniman closed 11 months ago
TpFIBDataSet.TFIBxxxField.OnValidate will create an Access Violation error when reading the same field as the OnValidate "sits" on.
OnValidate on a TStringField in a TpFIBDataSet works.
Delphi Tokyo (10.2.3)
This issue remains on Delphi Rio (10.3.3)
Tested with Delphi Sydney 10.4, work fine!
procedure TFIBCustomDataSet.DoFieldValidate(Field:TField;Buffer:Pointer); begin if Assigned(Field.OnValidate) then begin Include(FRunState,drsInFieldValidate); try FValidatingFieldBuffer:=Buffer; {$ifdef D_27} Field.Validate(FValidatingFieldBuffer); {$else} FValidatedField:=Field; FValidatedRec:= ActiveRecord; Field.OnValidate(FValidatingFieldBuffer); {$endif} finally Exclude(FRunState,drsInFieldValidate); FValidatingFieldBuffer:=nil; end; end; end;
Fixed in #76
TpFIBDataSet.TFIBxxxField.OnValidate will create an Access Violation error when reading the same field as the OnValidate "sits" on.
OnValidate on a TStringField in a TpFIBDataSet works.
Delphi Tokyo (10.2.3)
TestOnValidate.zip