Need Help!! oci8lib.so: ORA-06550 error..


S

Sri Krishna

stmt.c:541:in oci8lib.so: ORA-06550: line 1, column 7: (OCIError)
PLS-00306: wrong number or types of arguments in call to 'tax'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored from
c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:758:in `exec'
from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:141:in `do_ocicall'
from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:758:in `exec'
from tax.rb:30


here is my code..

Procedure description:

item_id_in number in
bundle_id_in number in
state_code_in varchar2 in
primary_zip_in varchar2 in
city_name_in varchar2 in
num_items_in number in
gross_amt_in number in
shipping_amt_in number in
gift_wrap_amt_in number in
vas_amt_in number in
tax_request_id_out number out
product_tax_info_out ref cursor out
product_sales_tax_out number out
shipping_sales_tax_out number out
gift_wrap_sales_tax_out number out
vas_tax_out number out
shipping_method_id_in number in
wrap_pattern_id_in number in
ship_to_address_id_in number in

RUBY CODE:
plsql =conn.parse("BEGIN
tax:)id,:bid,:state,:zip,:city,:itemCount,:amt,:shipAmt,
:giftAmt,:vasAmt,:taxReqIdOut,:prodTaxOut,:salesTaxOut,:shipTaxOut,:giftTaxOut,:vasTax,:shipMethodId,:wrapPatternId,:shipAddId);
END;")

plsql.bind_param(':id', 796023)
plsql.bind_param(':bid', nil, Float)
plsql.bind_param(':state', "CO")
plsql.bind_param(':zip', "80231")
plsql.bind_param(':city', "Denver")
plsql.bind_param(':itemCount', 1)
plsql.bind_param(':amt', 10.97)
plsql.bind_param(':shipAmt', 2.02)
plsql.bind_param(':giftAmt', 0)
plsql.bind_param(':vasAmt', 0)

plsql.bind_param(':taxReqIdOut', OCI8::Cursor)
plsql.bind_param(':prodTaxOut', OCI8::Cursor)
plsql.bind_param(':salesTaxOut', OCI8::Cursor)
plsql.bind_param(':shipTaxOut', OCI8::Cursor)
plsql.bind_param(':giftTaxOut', OCI8::Cursor)
plsql.bind_param(':vasTax', OCI8::Cursor)

plsql.bind_param(':shipMethodId', 0)
plsql.bind_param(':wrapPatternId', 0)
plsql.bind_param(':shipAddId', 0)

plsql.exec

taxReqcursor = plsql[':taxReqIdOut']
prodTaxcursor = plsql[':prodTaxOut']
taxcursor = plsql[':prodTaxOut']
shipTaxcursor = plsql[':shipTaxOut']
giftTaxcursor = plsql[':giftTaxOut']




while r = taxcursor.fetch()
puts r
end

puts taxcursor

conn.logoff
 
Ad

Advertisements

W

Wilson Bilkovich

stmt.c:541:in oci8lib.so: ORA-06550: line 1, column 7: (OCIError)
PLS-00306: wrong number or types of arguments in call to 'tax'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored from
c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:758:in `exec'
from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:141:in `do_ocicall'
from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:758:in `exec'
from tax.rb:30

Do smaller, "hello world" procedures execute properly for you?
 
K

KUBO Takehiro

stmt.c:541:in oci8lib.so: ORA-06550: line 1, column 7: (OCIError)
PLS-00306: wrong number or types of arguments in call to 'tax' ...
tax_request_id_out number out ...
plsql.bind_param(':taxReqIdOut', OCI8::Cursor)

You cannot bind a number argument as OCI8::Cursor.
Oracle doesn't know how to convert implicitly ref cursor
(OCI8::Cursor) to Number.
Bind it as Float or Integer.

plsql.bind_param(':taxReqIdOut', nil, Float)
or
plsql.bind_param(':taxReqIdOut', nil, Integer)
...
plsql.exec
...
tax_request_id = plsql[':taxReqIdOut']
 
Ad

Advertisements


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

Top