I have figured out what appears (after some testing) to be a workaround for
this problem.  I also think I may know why the original problem was
occurring, but I have not yet tested (or written) a solution.  The
workaround requires changes to tcl code.  A better long-term solution will
obviously be to fix the driver.  To use the workaround change the places in
your tcl where you are calling a plsql function from:

ns_ora exec_plsql "begin :1 := func_call; end;"

to

ns_ora exec_plsql_bind "begin :retVal := func_call; end;" retVal

This will cause the Oracle driver to use OCIBindByName instead of
OCIBindByPos.  Make sure that you also change the :1 to something
like :retVal otherwise the driver will still use OCIBindByPos and will give
a different error (from what looks like a different bug).  retVal is not
significant in any way here (it is not the name of a TCL or PLSQL
variable).  It is used to tell the Oracle driver the name of the bind
variable that will contain the return value of the function.

I suspect that this problem is being caused by a call to OCIBindByPos that
does not have a correct value for the indp parameter, although I cannot yet
confirm that.

Anyway, this has fixed our problem and hopefully it will help someone out
there as well.

Reply via email to