1

I have a question, I've tried to pass an out parameter but appears an error, this is my code:

cursor = connection.cursor()
lOutput = cursor.var(cx_Oracle.STRING)
lOutput.setvalue(0, '')
cursor.callproc("SOME_PROC',[lOutput])
return lOutput .getvalue(0)

Please help me. thanks in advance.

2
  • What error are you getting? That code looks pretty close. If you are calling a procedure with a pure out parameter then you don't need to set the value. Commented Apr 9, 2016 at 2:37
  • If I commented that line It generate this error message: Traceback (most recent call last): Commented Apr 12, 2016 at 14:58

1 Answer 1

2

I change the last line like this

return lOutput .getvalue()

And it runs.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.