Python sample code for PLSQL REF CURSORS
A.M
alanalan at newsgroup.nospam
Thu May 4 16:35:01 EDT 2006
Exactly what I was looking for.
Thanks alot
"Gerhard Häring" <gh at ghaering.de> wrote in message
news:mailman.5332.1146751430.27775.python-list at python.org...
> A.M wrote:
>> Hi,
>>
>> I am having hard time to find a sample that shows me how to return an OUT
>> REF CURSOR from my oracle stored procedure to my python program. [...]
>
> import cx_Oracle
>
> con = cx_Oracle.connect("me/secret at tns")
> cur = con.cursor()
> outcur = con.cursor()
> cur.execute("""
> BEGIN
> MyPkg.MyProc(:cur);
> END;""", cur=outcur)
>
> for row in out_cur:
> print row
>
> HTH,
>
> -- Gerhard
More information about the Python-list
mailing list