CallableStatement cstmt;
try {
cstmt = con.prepareCall("? = call spName(? , ? , ?)");//con在前面定义
cstmt.registerOutParameter(1 , Type.TINYINT);
cstmt.setObject(2 , TheParameter);
cstmt.setObject(3 , TheParameter);
cstmt.setObject(4 , TheParameter);
int ReturnFlag = cstmt.execute();
} catch(Exception e) {
System.out.println("调用存储过程发生错误 : " + e.getMessage());
}