Multiple usage of bind variables
Posted: Tue 26 Jun 2012 12:50
Hi there.
I get "ORA-01006: bind variable does not exist" in Direct mode, if I reuse a bind variable in a insert-statement with a returning parameter.
E.g.:
"insert into scott.emp e(e.empno, e.ename) values (:p1, :p2 || :p3 || :p3) returning e.empno into :ret"
Parameter P3 ist added only once to the Command.Parameters.
-> In Direct mode I get ORA-01006. Otherwise not.
-> Without the returning clause/parameter. The statement executes successfully.
-> Without appending :p3 a second time, the statement executes successfully.
I found this problem while testing version 7.0.17. I have no idea if this occurs in earlier versions.
Regards,
Matthias
I get "ORA-01006: bind variable does not exist" in Direct mode, if I reuse a bind variable in a insert-statement with a returning parameter.
E.g.:
"insert into scott.emp e(e.empno, e.ename) values (:p1, :p2 || :p3 || :p3) returning e.empno into :ret"
Parameter P3 ist added only once to the Command.Parameters.
-> In Direct mode I get ORA-01006. Otherwise not.
-> Without the returning clause/parameter. The statement executes successfully.
-> Without appending :p3 a second time, the statement executes successfully.
I found this problem while testing version 7.0.17. I have no idea if this occurs in earlier versions.
Regards,
Matthias