Hi,
Im trying around with Queries and named parameters. I have statements where one named parameter occurs several times.
Examle:
from bbb b where b.behaelter.id = :VAL0 and b.terminVon <=:VAL1 and (b.terminBis is null or b.terminBis > :VAL1)
I made a query (q) and called
q.setLong("VAL0",123456)
and
q.setLong("VAL1",987654)
I hoped that "VAL1" is replaced two times, because I read somewhere that all should replaced.
When I run the query my Database said:
java.sql.SQLException: ORA-01008: Nicht allen Variablen ist ein Wert zugeordnet
what means that not all variables are assigned with a value.
What can I do?
Thanks a lot in advance.
Alex
|