tzquery.Locate problem and dirty fix
Posted: 31.08.2006, 06:52
I work with a PGSQL database (8.x) and when I try to perfom a zquery.locate with multiple fields, sometimes works, another fails. Then in most of the cases the problem appeared when one of the fields was a integer field.
In CompareFieldsFromResultSet method at ZDatasetUtils.pas this instruction:
returns for integer fields (in my case sometimes) a CurrenType of stShort, and this one is not evaluated later at the case statment, then I modified the case statement:
Before
After
and since this dirty fix works fine. I hope that it can be useful for somebody. Maybe in a recent version that trouble was fixed. (i use an "old" 6.5.1 version).
Guillermo Luque y Guzman Saenz
LGS Ingenieria Ltda.
In CompareFieldsFromResultSet method at ZDatasetUtils.pas this instruction:
Code: Select all
CurrentType := ResultSet.GetMetadata.GetColumnType(ColumnIndex);
Before
Code: Select all
case CurrentType of
...
stInteger:
...
Code: Select all
case CurrentType of
...
stInteger, stShort:
...
Guillermo Luque y Guzman Saenz
LGS Ingenieria Ltda.