cx_Oracle execute procedure

Poppy znfmail-pythonlang at yahoo.com
Wed Mar 19 16:03:03 CET 2008


I've been working on the code below and and executes silently, no 
complaints, however the end result should be a record in my table and it's 
not added. The procedure works with the passed credentials using SQLPlus or 
SQL Developer clients. However I'm not sure if I'm constructing my python 
code correctly to interact with Oracle.

I've been basing the code below on what I found in this thread 
http://www.thescripts.com/forum/thread33728.html .

Zach-

import cx_Oracle

connection = cx_Oracle.connect("user/pass at server")

## PROCEDURE rptmgr.rep_utils.CLONE_REPORT( p_ordernum varchar2,p_repnum 
varchar2, p_prefix number)

cur = connection.cursor()

repParams = {}
repParams['arg1'] = "5555555"
repParams['arg2'] = "2"
repParams['arg3'] = "999"

sqlStr = """BEGIN rptmgr.rep_utils.CLONE_REPORT( :arg1, :arg2, :arg3); 
end;"""

cur.execute(sqlStr, repParams)

connection.commit

cur.close

connection.close





More information about the Python-list mailing list