public boolean isExists(Operator operator) {
Connection conn = null;
PreparedStatement stmt = null;
boolean tmp = false;
try {
conn = OracleDAOFactory.getConnection();
//conn = OracleDAOFactory.getConnection();
stmt = conn.prepareStatement(GET_AN_OPERATOR);
stmt.setString(1, operator.getOperator_ID());
stmt.setString(2, operator.getOperator_Pwd());
System.out.println(operator.getOperator_ID() + " && "
+ operator.getOperator_Pwd());
ResultSet rs = stmt.executeQuery();
if (rs.next()) {
[color=red]//执行不到这里...[/color]
tmp = true;
}
}
catch (SQLException e) {
tmp = false;
} finally {
OracleDAOFactory.closeStatement(stmt);
OracleDAOFactory.closeConnection(conn);
}
return tmp;
}