📄 adminfreezdaccount.java
字号:
/*
* Created on 2005-7-26
*
*/
package banksystem.business;
/**
* @author 曲本盛
*
* TODO Struts 项目实践
*/
import javax.sql.*;
import java.sql.*;
import banksystem.Constants;
public class AdminFreezdAccount {
/**
* @param dataSource 数据源.
* @param gene 查询语句生成器.
*/
public void setAccountStatus(DataSource dataSource,SearchGene gene)throws SQLException,Exception{
Connection con = null;
PreparedStatement stat = null;
try{
con= dataSource.getConnection();
stat = con.prepareStatement(gene.getFreezedUpdateStr());
int rows = stat.executeUpdate();
if(rows==0){
throw new SQLException(Constants.UPDATE_FAILED);
}
}
catch(SQLException e){
throw e;
}
catch(Exception e){
throw e;
}
finally{
try{
if(con!=null){
con.close();
}
if(stat!=null){
stat.close();
}
}
catch(SQLException e){
throw new SQLException(e.getMessage());
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -