Many Field Types missing in CompareFieldsFromResultSet

Code patches written by our users to solve certain "problems" that were not solved, yet.

Moderators: gto, cipto_kh, EgonHugeist, mdaems

Post Reply
MarkusD
Zeos Dev Team
Zeos Dev Team
Posts: 20
Joined: 28.08.2005, 03:40
Location: Ingolstadt

Many Field Types missing in CompareFieldsFromResultSet

Post by MarkusD »

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;
Post Reply