-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cursor.rowcount is always zero when executing PL/SQL #283
Comments
Apologies for the delay in getting back to you. This is not a bug. The value of If you need to know the number of rows updated inside a PL/SQL block you can use the PL/SQL expression |
Thanks for the reply. The main use case we've had for the Another possible workaround would be to use Is there any other way I can get at the row when calling PL/SQL with |
In thick mode using |
have the offset attribute populated with the last iteration that succeeded (#283).
I have just pushed a patch that will populate the offset attribute of exceptions raised when calling executemany() with PL/SQL. I think that should cover your scenario! |
Thanks! That looks like it should work perfectly. Do you have a ballpark for when this will be delivered in a release? |
It should be sometime in the next couple of weeks -- but as always, such dates are subject to change! |
This was made available in python-oracledb 2.1.0. |
Originally I encountered the issue in OracleDb 1.4.2 but I decided to try upgrading to the latest version to see if the issue was still present.
Is it an error or a hang or a crash?
Error
What error(s) or behavior you are seeing?
When calling
cursor.executemany()
with an anonymous PL/SQL block, the value ofcursor.rowcount
is always0
. I expect the value to be number of rows that were processed or, in the case of an error, the number of rows before the error. Callingcursor.executemany()
with SQL produces the expected result. I also tried the same code with cx_Oracle 8.3.0 and got the expected result.The result of the Python script below is
I'm expecting it to be:
Does your application call
init_oracle_client()
?Yes
Include a runnable Python script that shows the problem.
SQL
Python
The text was updated successfully, but these errors were encountered: