Re: [cx-oracle-users] Calling function returning INTEGER
Brought to you by:
atuining
From: Amaury F. d'A. <ama...@gm...> - 2006-10-04 08:24:39
|
(the mailing list seems to reject all my messages That's why I send this directly to you) James Reese wrote: > Hi, > > I'm using the cx_Oracle cursor method callfunc() to call an Oracle > function that returns type INTEGER. Is there any way to get callfunc > () to return a Python integer value instead of a float? I suppose that you wrote cursor.callfunc("myFunc", cx_Oracle.NUMBER) If you pass a variable object instead of the variable type, you may force it to return integer values: var = cursor.var(cxOracle.NUMBER) var.setvalue(0, 0) # sets the value to an int, this forces the variable's return type cursor.callfunc("myFunc", var) But AFAIK there is no automatic detection of the Oracle function's return type. Hope this helps > I apologize if the answer to this is well-known. I don't think so... -- Amaury Forgeot d'Arc |