문제

I'm trying to access the value of a LOB returned by a procedure with cx_Oracle. LOB is the first field of tuple ('reg[0]').

When I do this:

regs = cursor.fetchall()
for reg in regs:
    print reg[0]

The following error happens:

DatabaseError: ORA-22922: nonexistent LOB value

And when I try to use read() method (reg[0].read() instead of print reg[0]), but the error is the same.

How can I access the LOB value in this case?

도움이 되었습니까?

해결책

I was using sqlalchemy Session and executing the command directly in Session instead of a cursor.

When I created a cursor and did cursor.execute(procedure), I got access to LOB content with read() method as desired.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top