PLS-00201: identifier must be declared #232
-
Hello, I have a the following function:
python code goes like this (dont mind pool parameters, i have excluded log lines, decorators and the second connection since the code is failing at this part shown below):
If i execute function reserve_msisdn() using result = cursor.callproc('myfunction', int, (msisdn, carrier, username, reservation_date)) i get:
If i execute function reserve_msisdn() using result = cursor.callproc('myfunction', (msisdn, carrier, username, reservation_date)) , note i've excluded int parameter for returning value, i get:
This error appears even if i execute reserve_msisdn() function without p_reservationDate -> sysdate+1. I thought maybe i made a typo i do not see so i tried to execute the same code in a different way using:
The same error appears. What else i should try or check to overcome this issue? BR, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hello, Figured out what was missing. I have omitted user.packagename.functionname when executing sql funtion. Fixed with:
It also works for bulk execution using execuemany:
Im stuck to figure out how to get/read return value of this function. It is important since in case it returns 0, it means no errors. I need this to be sure when to commit the changes. If i try the code below, i get None as return value:
If i try this code:
I get:
BR, |
Beta Was this translation helpful? Give feedback.
You actually need to bind the output variable! Like this:
You can do the same with a call to a function, but there is a shortcut that is included with the driver: