THX!

解决方案 »

  1.   

    再java中public String getChannelURL(long channelID, boolean bb)
        throws SQLException, NamingException{
            long broadcastType = 1;
            String sque = "begin :1 := procedure_name(:2, :3, :4, :5, :6); end;";
            Connection conn = null;
            CallableStatement cstmt = null;
            ResultSet rset = null;
            try{
                DataSource ds  = DataConnectionWB.getDataSource();
                 conn = ds.getConnection();
                 cstmt = conn.prepareCall(sque);            cstmt.registerOutParameter(1, OracleTypes.VARCHAR);
                cstmt.registerOutParameter(5, OracleTypes.VARCHAR);
                cstmt.registerOutParameter(6, OracleTypes.NUMBER);
              
                cstmt.setLong(2, userid);
                cstmt.setLong(3, channelID);
                cstmt.setLong(4, 2);            cstmt.execute();            String sURL = cstmt.getString(1);
                String sIP = cstmt.getString(5);
                broadcastType = cstmt.getLong(6);
                return sURL;
            }
            catch(Exception e){
                return "";
            }
            
        }
      

  2.   

    这段脚本可以直接用WINDOWS脚本运行吗?
      

  3.   

    sqlplus username/password @c:\script.txt
    c:\script.txt内容execute yourprocedurename;