|
| [WD22] Issue with HReadSeekFirst |
| Iniciado por guest, 22,feb. 2018 07:50 - 5 respuestas |
| |
| | | |
|
| |
| Publicado el 22,febrero 2018 - 07:50 |
Hello,
[wd22] [postgresql]
I have a composite key with 6 fields,
File1
Field1 varchar(10) Field2 varchar(10) Field3 int Field4 varchar(10) Field5 varchar(3) Field6 int
Composite Key [Field1Field2Field3Field4Field5Field6]
When I try to read with HReadSeekFirst(File1, Field1Field2Field3Field4Field5Field6, [Value1, Value2, Valu3, Value4, Value5, Value6] )
it always returns True. Even HFound also returns true Even for those values for which NO record is found.
It points to first record and returns value corresponding to the first record for any value that's been seek.
But the same query run through HExecuteSQLQuery returns correct value and record, but not using HReadSeekFirst.
Any thing that I'm missing ?
Happiness Always BKR Sivaprakash |
| |
| |
| | | |
|
| | |
| |
| Publicado el 22,febrero 2018 - 13:01 |
Hi
can you test if you have the same result with hreadseek + hidentical option instead of the hreadseekfirst?
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 22,febrero 2018 - 15:04 |
Yes Fabrice Harari,
We checked with hreadkseek + hidentical also, same result. We found that this issue happens with this file.
Another file with a composite key of 5 fields, with the same data type works fine. File2
Field1 varchar(10) Field2 varchar(10) Field3 int Field4 varchar(10) Field5 varchar(3)
Composite Key [Field1Field2Field3Field4Field5]
This works fine. HReadSeekFirst(File1, Field1Field2Field3Field4Field5, [Value1, Value2, Valu3, Value4, Value5] )
Happiness Always BKR Sivaprakash |
| |
| |
| | | |
|
| | |
| |
| Publicado el 22,febrero 2018 - 16:34 |
| maybe you can check if the fields in the index are case sensitive? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 22,febrero 2018 - 21:59 |
Hello Sivaprakash
Try using HBuildkeyvalue() instead of the array square brackets
Regards Al |
| |
| |
| | | |
|
| | |
| |
| Publicado el 22,febrero 2018 - 21:59 |
| Not that I have much experience with pg, but the native driver translates h* statements into sql, so if you are able to trace the queries received at the pg server, it might provide some insight. |
| |
| |
| | | |
|
| | | | |
| | |
|