Question

i was able to run and oracle stored procedure thanks to this question: How do I run an Oracle stored procedure in Ruby

Now, i'm trying to do the same but on an oracle stored function. Thanks in advance.

Was it helpful?

Solution

Oracle function always return some value, so, instead of

cursor = conn.parse ('begin ROAMFLEX.GETMSISDNSTATUS(:msi, :status, :remaining_credit);end;')

you will use

cursor = conn.parse ('begin :res = ROAMFLEX.GETMSISDNSTATUS(:msi, :status, :remaining_credit);end;')
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top