日期:2014-05-20 浏览次数:20986 次
public boolean setCommentFlowFlag (String value,String modid){
boolean flag=false;
String sql="update module set commentflag=? where moduleid=?";
try {
conn = dbutil.getConnection(); //conn,pst,dbutil已经在类中声明是实例变量
pst = conn.prepareStatement(sql);
pst.setString(1, value);
pst.setString(2,modid);
int i = pst.executeUpdate(sql);
if(i!=0)
flag=true;
return flag;
}
.........省略相关catch,finally语句。
}