SELECT
ROUND(MYTABLE.ID - :pIntMinID),
MYTABLE.STRINGFIELD1,
MYTABLE.STRINGFIELD2
FROM MYTABLE
WHERE
MYTABLE.NUMERICFIELD1 = 1 AND
MYTABLE.ID > :pIntMinID AND
MYTABLE.ID < :pIntMaxID
ORDER BY MYTABLE.ID ASC
Opening this query throws an error:
Fetch FETCH ROW ORA-01008: not all variables bound (#1008)
Now, remove one STRINGFIELD from the query (OR the ROUND function...?!). This time there are no errors, but the query has 0 results; however in the database there are records matching this criteria!
I remember the exact same query worked before the new TZParams but I don't feel like rolling back half of my code so I can test it with the old one...
Both :pIntMinID and :pIntMaxID are set, while debugging TZQuery.Params.Count returns 2, both are .Bound and are not .IsNull:
Code: Select all
[2021.01.26 22:03:46.299] Bind prepared Statement 25 : 0,1000
[2021.01.26 22:03:46.339] Fetch FETCH ROW ORA-01008: not all variables bound (#1008)
[2021.01.26 22:04:09.463] Bind prepared Statement 27 : 0,1000
[2021.01.26 22:04:09.504] Fetch Statement 27, affected 0 row(s) in 39 ms
ID is NUMBER, STRINGFIELD1 is VARCHAR2(200), STRINGFIELD2 is VARCHAR2(200), NUMERICFIELD1 is NUMBER
Based on the fact that removing one string field from the query yields a different result I'd really appreciate some hints in where to look to find the issue. I'll try to do my best to recreate a minimalistic test case in the mean time.
P.s.:
SELECT ROUND(100 - :pIntNumber) FROM DUAL
works just fine.