I am using OCI8 and SEQUEL to execute a stored procedure against Oracle.
I can connect and retrieve data with SEQUEL, but when I run the stored
procedure, the return value is "1".
It appears SEQUEL doesn't like the 1 coming back from the stored procedure?
The 1 causes the following error:
/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequel-4.32.0/lib/sequel/adapters/oracle.rb:92:in
> `ensure in block in _execute': undefined method `close' for 1:Fixnum
> (NoMethodError)
> from
> /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequel-4.32.0/lib/sequel/adapters/oracle.rb:92:in
>
> `block in _execute'
> from
> /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequel-4.32.0/lib/sequel/database/connecting.rb:251:in
>
> `block in synchronize'
> from
> /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequel-4.32.0/lib/sequel/connection_pool/threaded.rb:105:in
>
> `hold'
> from
> /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequel-4.32.0/lib/sequel/database/connecting.rb:251:in
>
> `synchronize'
> from
> /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequel-4.32.0/lib/sequel/adapters/oracle.rb:77:in
>
> `_execute'
> from
> /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequel-4.32.0/lib/sequel/adapters/oracle.rb:67:in
>
> `execute'
> from
> /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequel-4.32.0/lib/sequel/dataset/actions.rb:952:in
>
> `execute'
> from
> /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequel-4.32.0/lib/sequel/adapters/oracle.rb:364:in
>
> `fetch_rows'
> from
> /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sequel-4.32.0/lib/sequel/dataset/actions.rb:141:in
>
> `each'
> from
> /opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/etl-0.1.0/lib/etl/load_accounts.rb:38:in
>
> `run'
> from ./load_accounts:104:in `<main>'
If I execute it with OCI8, it returns 1
irb(main):015:0> begin
> irb(main):016:1* db.exec("begin schema_name.compile_views(); end;")
> irb(main):017:1> rescue
> irb(main):018:1> puts "I failed?"
> irb(main):019:1> end
> => 1
the stored procedures just runs a bunch of compile view commands against
views.
CREATE OR REPLACE PROCEDURE schema_name.compile_views AS
l_sqlr VARCHAR2(250);
BEGIN
l_sqlr := 'alter view schema_name.ACCOUNT compile';
execute immediate l_sqlr;
etc
etc
END;
/
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.