Re: [cx-oracle-users] Calling function returning INTEGER
Brought to you by:
atuining
From: Amaury F. d'A. <ama...@gm...> - 2006-10-05 15:14:28
|
2006/10/2, Anthony Tuininga wrote: > Could someone please reply to this e-mail indicating they received it. > I've just received a couple of bounce messages for two of my latest > posts. I've just received it. I also got two messages rejected last week. I sent my answer directly to the OP. For the record, here it is: 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 |