1 / 6
文档名称:

学生学籍管理系统源代码.doc

格式:doc   大小:45KB   页数:6页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

学生学籍管理系统源代码.doc

上传人:1136365664 2018/3/5 文件大小:45 KB

下载得到文件列表

学生学籍管理系统源代码.doc

文档介绍

文档介绍:源代码:
连接数据库的代码:
.;
import ;
import ;
import ;
import ;
import ;
public class ess {
final static private String strDriver="";
final static private String url="jdbc:mysql://localhost:3306/xjgl?userUnicode=true&characterEncoding=gb2312";
final static private String user="root";
final static private String password="admin";
private static ess db = null;
private Connection con;
private Statement stmt;
private ResultSet rst;
private ess(){
try {
(strDriver);
con=(url, user, password);
stmt=();
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
();
} catch (SQLException e) {
// TODO Auto-generated catch block
();
}
}
public static ess ess(){
if(db==null){
db= new ess();
}
return db;
}
public Connection getConnection(){
return con;
}

public ResultSet query(String sql){
try {
rst=(sql);
} catch (SQLException e) {
// TODO Auto-generated catch block
();
}
return rst;
}
public int update(String sql){
int flag=0;
try {
flag=(sql);
} catch (SQLException e) {
// TODO Auto-generated catch block