ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[¤À¨É] JAVA³s±µMY SQL¸ê®Æ®w

[¤À¨É] JAVA³s±µMY SQL¸ê®Æ®w

§Ú¥Îªº¬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

        ÀR«ä¦Û¦b : «Î¼e¤£¦p¤ß¼e¡C
ªð¦^¦Cªí ¤W¤@¥DÃD