oracle proc : ArgumentError (interning empty string)

S

Smp Mp

Hi,

I am trying to access oracle proc.

Code as below :

require "ruby-plsql"
OracleConnection.establish_connection "oracle_#{RAILS_ENV}"
plsql.connection =
OracleConnection.connection.raw_connection.connection
cursor = plsql.connection.parse <<-EOS
BEGIN
user:)empid, :terms, :List, :rooms);
END;
EOS
cursor.bind_param(':empid','0001234','IN')
cursor.bind_param(':terms','','OUT')
cursor.bind_param(':List','','OUT')
cursor.bind_param(':rooms','','OUT')

cursor.exec
puts cursor[':terms']
puts cursor[':List']
puts cursor[':rooms']
cursor.close

************

I am not able to retrieve the OUT params. When the line cursor[':terms']
gets executed. I get error message as :

ArgumentError (interning empty string):
C:/jruby-1.4.0/lib/ruby/gems/1.8/gems/ruby-plsql-0.4.3/lib/plsql/jdbc_connection.rb:298:in
`get_bind_variable'
C:/jruby-1.4.0/lib/ruby/gems/1.8/gems/ruby-plsql-0.4.3/lib/plsql/jdbc_connection.rb:115:in
`[]'
app/models/oracle_connection.rb:147:in `get_terms_rooms_list'
app/controllers/secure/ccrp_controller.rb:8:in `index'

Checked the file in gem ruby-plsql-0.4.3\lib\plsql\jdbc_connection.rb.
@statement.registerOutParameter is not getting executed as condition
below fails
if metadata[:in_out] =~ /OUT/ .

If I comment the above line, i am able to get the results from out
params ,cursor[':terms'] etc..

Am I setting the bind_params incorrect?

Kindly help resolve.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top