oracle / python-cx_Oracle

Python interface to Oracle Database now superseded by python-oracledb
https://oracle.github.io/python-cx_Oracle
Other
889 stars 361 forks source link

Reusing object type from an already closed session for another session: OCI-21710 #604

Closed robingie closed 2 years ago

robingie commented 2 years ago

Hello there,

lately, I'm dealing with the objects types from the oracle database within Python.

I'm fetching a resultset with one or more object types (collections + inner objects types) in a different session. After a few processing steps, I would like to reuse the cx_Oracle.Object.

If I reuse the object from the old session within a new session I get the following error: _error code: 21710 - errormessage: OCI-21710: argument is expecting a valid memory address of an object

In the new session, I'm calling the cursor.callproc() method.

Is there any way to reuse the object without rebuilding it from scratch? The different sessions are a requirement by the application design.

cjbj commented 2 years ago

Sorry, this is a behavior-by-design of the Object model in the Oracle Client libraries. But thanks for letting us know this is important to you. We'll continue to highlight the demand with the Oracle team looking after this area.