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

Discussion in 'Ruby' started by Sri Krishna, Jun 11, 2008.

  1. Sri Krishna

    Sri Krishna Guest

    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
    --
    Posted via http://www.ruby-forum.com/.
     
    Sri Krishna, Jun 11, 2008
    #1
    1. Advertising

  2. On 6/11/08, Sri Krishna <> 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?
     
    Wilson Bilkovich, Jun 13, 2008
    #2
    1. Advertising

  3. On Thu, Jun 12, 2008 at 7:55 AM, Sri Krishna <> 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']
     
    KUBO Takehiro, Jun 13, 2008
    #3
  4. Sri Krishna

    Sri Krishna Guest

    Sri Krishna, Jun 13, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. biteside
    Replies:
    0
    Views:
    4,419
    biteside
    Oct 13, 2003
  2. =?Utf-8?B?QUtH?=

    ORA-06550

    =?Utf-8?B?QUtH?=, May 20, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    10,976
    =?Utf-8?B?QUtH?=
    May 20, 2005
  3. Vivek N
    Replies:
    0
    Views:
    2,346
    Vivek N
    Aug 16, 2006
  4. Mauricio Martinez Garcia
    Replies:
    0
    Views:
    678
    Mauricio Martinez Garcia
    Jan 4, 2011
  5. Ian Kelly
    Replies:
    0
    Views:
    799
    Ian Kelly
    Jan 4, 2011
Loading...

Share This Page