代码如下:
try{
Connection conn =dm.getConnection();
String procedure = "{call Pro_sms_job (?,?,?,?,?)}";
CallableStatement cstmt = conn.prepareCall(procedure);
cstmt.setString(1,ids);
cstmt.setString(2,msg);
cstmt.setString(3,dt);
if (isg.equals("1"))
cstmt.setBoolean(4,true);
else
cstmt.setBoolean(4,false); if(isnow.equals("1"))
cstmt.setBoolean(5,true);
else
cstmt.setBoolean(5,false);
System.out.println("gogogog=============================");//--只能打印此行
cstmt.executeUpdate();//--这句似乎没有执行
System.out.println("gohere=============================");
out.print("1");
}catch(SQLException ex)
{
out.print("0");
}
try{
Connection conn =dm.getConnection();
String procedure = "{call Pro_sms_job (?,?,?,?,?)}";
CallableStatement cstmt = conn.prepareCall(procedure);
cstmt.setString(1,ids);
cstmt.setString(2,msg);
cstmt.setString(3,dt);
if (isg.equals("1"))
cstmt.setBoolean(4,true);
else
cstmt.setBoolean(4,false); if(isnow.equals("1"))
cstmt.setBoolean(5,true);
else
cstmt.setBoolean(5,false);
System.out.println("gogogog=============================");//--只能打印此行
cstmt.executeUpdate();//--这句似乎没有执行
System.out.println("gohere=============================");
out.print("1");
}catch(SQLException ex)
{
out.print("0");
}
{
out.print("0");
}1有这样处理意外的吗?
2实在不行
select Pro_sms_job (x,x,x,x,x) from dual
又不是function,何必那么复杂。