anchor.diff:  begin
     if (FDataType = ptDate) or (FDataType = ptDateTime) then
     begin
  -    Result := ValueAsDouble;
  +    if VarIsNull(FValue) or VarIsEmpty(FValue) then
  +      Result := 0
  +    else
  +      Result := VarToDateTime(FValue);
     end
     else
     begin
  
positive.code:   DefaultParamCheck : boolean = true;
  
  implementation
  
  function DataTypeToParameterDataType(aValue: TFieldType): TmParameterDataType;
  begin
  
negative.code: begin
    if (FDataType = ptInteger) then
    begin
      if VarIsNull(FValue) or VarIsEmpty(FValue) then
        Result := 0
      else
        if VarIsFMTBcd(FValue) then
          Result := BCDToInteger(VarToBCD(FValue))
        else
          Result := FValue;
    end
    else
    begin
  