Icon View Incident Report

Serious Serious
Reported By: Jose Eduardo Helminsky
Reported On: 3/31/2005
For: Version 4.18 Build 1
# 2005 SQL DISTINCT Clause Not Working Properly with BCD Fields

I am using DISTINCT with BCD fields and it is not working in 4.16. I've tried with DBSYS 4.18 and it is not working too.


Comments Comments
This problem requires more than the installation of 4.19 to fix the issue since it is due to garbage occupying part of the TBCD structure that DBISAM (and Delphi in general) uses for BCD values. Previously, this structure was not initialized before being populated during column assignments, etc. This caused random data to be used in calculating the hash for records in the table, meaning that two exact same BCD values would be considered distinct and different by DBISAM due to the fact that they have different hash values caused by this garbage. 4.19 now corrects this, but you must:

1) Alter the table's structure and convert any BCD fields to string fields.
2) Alter the table's structure again and convert any of these string fields back to BCD fields.

This process will clean out any garbage in the TBCD structures used in the BCD values in the DBISAM table.


Resolution Resolution
Fixed Problem on 4/2/2005 in version 4.19 build 1


Products Affected Products Affected
DBISAM Additional Software and Utilities
DBISAM ODBC Client-Server
DBISAM ODBC Client-Server with Source
DBISAM ODBC Standard
DBISAM ODBC Standard with Source
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source

Image