如何在日食中推导并解决未知来源错误

时间:2017-01-07 12:19:09

标签: java eclipse

package mi;
import java.sql.*;

import javax.swing.JOptionPane;
import javax.swing.JPanel;


public class SqliteConnectio {
    Connection conect=null;
    public static Connection dbConnection(){
        try {
            Class.forName("org.sqlite.JDBC");  
            Connection conect=DriverManager.getConnection(  
                    "jdbc:sqlite:E:\\JAVA WORLD\\sgliteDatabase\\customer.sqlite");  
            JOptionPane.showMessageDialog(null, "sucessful login to database");
            return conect;
                    } catch (Exception e) {
            JOptionPane.showConfirmDialog(null, "failed to login in database");
            return null;

        }

    }

}

//这是我与数据库的连接,它似乎通过提示“用户名和密码已经插入了”来正常工作

{{1}}

0 个答案:

没有答案