From: krzysztof cierpisz Date: 2009-09-22T18:15:04+09:00 Subject: Re: ruby-oci8 function On Sep 22, 9:33 am, beny 18241 wrote: > Hi, > > Thanks for help but still some problem exists, please see below: > > ----- > #!/usr/bin/ruby > > require 'rubygems' > require 'oci8' > require 'ruby_plsql' > > plsql.connection = OCI8.new("SYSTEM","orcl","//localhost/xe"); > puts  plsql.get_names_f( :name => 'value1' , :sum => 'value2') ; > plsql.logoff > > ------ > > I get following error: > > ---- > ruby repo.rb > stmt.c:539:in oci8lib.so: ORA-06550: line 2, column 12: (OCIError) > PLS-00382: expression is of wrong type > ORA-06550: line 2, column 1: > PL/SQL: Statement ignored >   from /usr/local/lib/site_ruby/1.8/oci8.rb:759:in `exec' >   from /usr/local/lib/site_ruby/1.8/oci8.rb:142:in `do_ocicall' >   from /usr/local/lib/site_ruby/1.8/oci8.rb:759:in `exec' >   from > /var/lib/gems/1.8/gems/ruby-plsql-0.3.1/lib/plsql/oci_connection.rb:71:in > `exec' >   from > /var/lib/gems/1.8/gems/ruby-plsql-0.3.1/lib/plsql/procedure.rb:186:in > `exec' >   from > /var/lib/gems/1.8/gems/ruby-plsql-0.3.1/lib/plsql/schema.rb:117:in > `method_missing' >   from repo.rb:14 > > ------- > > I have working function in oracle as you can see begging of function > code: > > create or replace FUNCTION                GET_NAMES_F > ( >    name IN table.name%TYPE, >    sum IN table.sum%TYPE > > ----- > > desc table to see types > NAME     NOT NULL VARCHAR2(200) > VALUE    VARCHAR2(1024) > > ----- > does this work when you're logged into your database? select get_names_f('value1' , 'value2') from dual; if yes please paste the full function creation statement chris