基于JSP的学生考勤系统
PreparedStatement pst = null;
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
if (con == null || con.isClosed()) {
con = DriverManager.getConnection(
"jdbc:sqlserver://localhost:1433;databaseName=kaoqin",
"sa", "sa");
}
pst = con.prepareStatement(sql);
return pst;
1