http://expert.csdn.net/Expert/topic/1929/1929884.xml?temp=.4103815
帮帮忙了,已经把我搞死了!

解决方案 »

  1.   

    private static final String INSERT="{call Insert(?,?,?,?,?,?,?)}";
    Connection con = null;
            CallableStatement cstmt;
                con = ConnectionManager.getConnection();
                cstmt = con.prepareCall(INSERT);
                cstmt.setString(1, "name");
                cstmt.setInt(2, 2);
                 ……
                cstmt.registerOutParameter(7, java.sql.Types.INTEGER);//注册返回值
                cstmt.executeUpdate();
                id = cstmt.getInt(7);//取得返回值