Many Field Types missing in CompareFieldsFromResultSet
Posted: 31.08.2005, 14:36
Locate doesn't work on many field types because they are missing in compareFieldsFromResultSet in ZDataSetUtils. I also doubt that stBinary,stAsciiStream, stUnicodeStream and stBinaryStream are compared even with the following change and the FLOAT_COMPARE_PRECISION is quite big for Double or Extended.
case CurrentType of
stBoolean:
begin
Result := KeyValues.VBoolean =
ResultSet.GetBoolean(ColumnIndex);
end;
stByte,
stShort,
stInteger,
stLong:
begin
Result := KeyValues.VInteger =
ResultSet.GetLong(ColumnIndex);
end;
stFloat,
stDouble,
stBigDecimal:
begin
Result := Abs(KeyValues.VFloat -
ResultSet.GetBigDecimal(ColumnIndex)) < FLOAT_COMPARE_PRECISION;
end;
stDate,
stTime,
stTimestamp:
begin
Result := KeyValues.VDateTime =
ResultSet.GetTimestamp(ColumnIndex);
end;
case CurrentType of
stBoolean:
begin
Result := KeyValues.VBoolean =
ResultSet.GetBoolean(ColumnIndex);
end;
stByte,
stShort,
stInteger,
stLong:
begin
Result := KeyValues.VInteger =
ResultSet.GetLong(ColumnIndex);
end;
stFloat,
stDouble,
stBigDecimal:
begin
Result := Abs(KeyValues.VFloat -
ResultSet.GetBigDecimal(ColumnIndex)) < FLOAT_COMPARE_PRECISION;
end;
stDate,
stTime,
stTimestamp:
begin
Result := KeyValues.VDateTime =
ResultSet.GetTimestamp(ColumnIndex);
end;