Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Need Help!! oci8lib.so: ORA-06550 error..

Reply
Thread Tools

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

 
 
Sri Krishna
Guest
Posts: n/a
 
      06-11-2008
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,:sh ipAmt,
:giftAmt,:vasAmt,:taxReqIdOut,rodTaxOut,:salesTa xOut,: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('rodTaxOut', 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['rodTaxOut']
taxcursor = plsql['rodTaxOut']
shipTaxcursor = plsql[':shipTaxOut']
giftTaxcursor = plsql[':giftTaxOut']




while r = taxcursor.fetch()
puts r
end

puts taxcursor

conn.logoff
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Wilson Bilkovich
Guest
Posts: n/a
 
      06-12-2008
On 6/11/08, Sri Krishna <(E-Mail Removed)> wrote:
> 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?

 
Reply With Quote
 
 
 
 
KUBO Takehiro
Guest
Posts: n/a
 
      06-13-2008
On Thu, Jun 12, 2008 at 7:55 AM, Sri Krishna <(E-Mail Removed)> wrote:
> 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']

 
Reply With Quote
 
Sri Krishna
Guest
Posts: n/a
 
      06-13-2008
Great!! You r correct. It worked.
Thanks for the help.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to "shred" hardive..need software. Xeno Chauvin Computer Support 4 03-13-2005 01:26 PM
Need help with need to Force Garbage Collect John Java 1 08-19-2004 03:32 PM
Need help! I need to add lead zeros to a textbox Teep ASP .Net 2 06-21-2004 01:04 PM
Please help!!! Need datagrid selection to fill textboxes...Need quick!! TN Bella ASP .Net 1 06-18-2004 01:31 AM
Need to compare Photos to DVD software - Need Help? Bob Digital Photography 4 02-04-2004 02:13 AM



Advertisments