-
Notifications
You must be signed in to change notification settings - Fork 364
Closed
Labels
Description
With cx_Oracle 6.0.3, I can't figure out how to close a connection after making a query with a LOB result. Even if I make sure to close the cursor, and delete the LOB object or call close()
on it, I still get DPI-1054: connection cannot be closed when open statements or LOBs exist
.
What's the best way to ensure everything is closed so the connection can be closed?
conn = cx_Oracle.connect(dsn)
cursor = conn.cursor()
id, my_lob = cursor.execute(...).fetchone()
result_string = my_lob.read()
# Need to close LOB. How?
del my_lob
cursor.close()
conn.close() # Always fails
Python 2.7 64bit
cx_Oracle 6.0.3
oracle-instantclient 11.2.0.4.0
Windows 10
dvinesett