DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: What error?

  1. #1
    Join Date
    Sep 2001
    Posts
    99
    I have a function in a package,this function is follows:
    function getType(typeid in varchar2,typename out varchar2,typedescribe out varchar2) return boolean
    as
    begin
    typename := '';
    typedescribe := '';
    select kind_name,describe into typename,typedescribe from prod_kind where kind_id = typeid;
    return true;
    exception
    when OTHERS then
    begin
    return false;
    end;
    end;
    I called this function in sql*plus,it can execute sussesfully.But I call this function in jdbc,an error occurs.
    this java code like that:
    public boolean getTypeInfo()
    {
    try
    {
    Connection myConn = connPool.getConnection();
    CallableStatement cs = myConn.prepareCall("{?=call product.getType(?,?,?)}");
    cs.registerOutParameter(1,Types.BIT);
    cs.setString(2,typeId);
    cs.registerOutParameter(3,Types.VARCHAR);
    cs.registerOutParameter(4,Types.VARCHAR);
    cs.execute();
    typeName = cs.getString(3);
    typeDescribe = cs.getString(4);
    boolean result = cs.getBoolean(1);
    cs.close();
    myConn.close();
    return result;
    }
    catch (Exception e)
    {
    return false;
    }
    }

    -----
    when execute cs.execute() statemaent , an SQLException throws.And message is ORA-06550
    please help
    thanks
    ocean
    ocean

  2. #2
    Join Date
    Aug 2001
    Posts
    111
    This might be better put in the developer forum
    Performance... Push the envelope!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width