Re: [cx-oracle-users] How is cursor.callfunc() supposed to work?
Brought to you by:
atuining
From: Paul M. <p.f...@gm...> - 2012-02-22 07:39:06
|
On 22 February 2012 06:07, James C. McPherson <Jam...@or...> wrote: > I eventually fell back to using a Statement ala > > cursor.execute(""" > DECLARE > outnum NUMBER; > outmsg VARCHAR2(5000); > BEGIN > package.api.functionname( > ID => 13741059, > comments => 'Fixed in changeset: 14209:585efc418ca7', > commenttype => 'N', > opaqueid => NULL, > error_code => bugoutnum, > error_mesg => bugoutmsg); > END; > """) > connection.commit() > > ... which worked. > > > So ... should I try to use cursor.callfunc() in the future, > or just stick with statements like the above? >From this code, it appears the api call is a procedure, rather than a function (no return value). The cursor.callfunc method won't work for procedures, I suspect (no return type - you appear to have used cx_Oracle.NUMBER in your tests, for some reason...). So I'd suggest that you need to stick with the execute of a block solution. Paul |