ªð¦^¦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 : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD