§Ú¥Îªº¬Omy sql¡A³o¬Ocode
public MySQLAccess(String db, String user, String pw) {
dbName = db;
username = user;
password = pw;
try {
Class.forName("com.mysql.jdbc.Driver");
connect = DriverManager.getConnection("jdbc:mysql://localhost/"
+ dbName, username, password);
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Fail to connection");
}//try |