Friday, October 23, 2009

[Rails] Re: Get return from oracle procedure

I believe the problem that oracle procedures do not return a value
(oracle defines procedures and functions differently).

The easiest way to interact with PLSQL procedures is to use the plsql
gem http://ruby-plsql.rubyforge.org/ or http://github.com/rsim/ruby-plsql.
Read through the ruby-plsql documentation to see exactly how to use it
but it will be something like:

# you could name the argurments
with :a_number=>112, :start_date=>'21/10/2009' etc. based on the
parameters of podeviajar
result = plsql.podeviajar(112, '21/10/2009', '22/10/2009', 1,
1,26112);
puts result[:RESULTV]
puts result[:RESULTBC]

Hope this helps
Alex

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate