vendredi 4 septembre 2015

No suitable driver found for jdbc:path - SQL Lite

First time asking a question on Stack Overflow.

I have searched through a couple of the questions, which have already been answered but most of them were for mysql. I have an issue with my program, as it does not connect to the database.

Connection conn = null;
public static Connection ConnecrDb(){
    try{
        Class.forName("org.sqlite.JDBC");
        Connection conn = DriverManager.getConnection("jdbc.sqlite:C:\\Users\\Emerald\\Documents\\NetBeansProjects\\ITPAT\\DietTracker.sqlite");
        JOptionPane.showMessageDialog(null, "Connection Established");
        return conn;
    }
    catch(Exception e) {
        JOptionPane.showMessageDialog(null, e);
                return null;
    }
}

}

Aucun commentaire:

Enregistrer un commentaire