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:
Code: Select all
CurrentType := ResultSet.GetMetadata.GetColumnType(ColumnIndex);
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
Code: Select all
case CurrentType of
...
stInteger:
...
After
Code: Select all
case CurrentType of
...
stInteger, stShort:
...
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.