String url ="jdbc:mysql://localhost/rajdb?"+
"user=username&password=yourpassword&useUnicode=true&characterEndcoding=GB2312";
String driverName ="org.gjt.mm.mysql.Driver";
try {
Class.forName(driverName);
} catch(ClassNotFoundException e){
e.printStackTrace();
}
try {
connection=DriverManager.getConnection(url);
statement=connection.createStatement();
} catch(SQLException e) {
e.printStackTrace();
}
"user=username&password=yourpassword&useUnicode=true&characterEndcoding=GB2312";
String driverName ="org.gjt.mm.mysql.Driver";
try {
Class.forName(driverName);
} catch(ClassNotFoundException e){
e.printStackTrace();
}
try {
connection=DriverManager.getConnection(url);
statement=connection.createStatement();
} catch(SQLException e) {
e.printStackTrace();
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货