数据库无法访问,Class未找到异常

时间:2014-11-27 19:29:02

标签: sqlite

Connection conn =null;
public static Connection ConnecrDb(){

    try{
        Class.forName("org:sqlite:JDBC");
        Connection conn= DriverManager.getConnection("jdbc:sqlite:C:\\Users\\sohaib\\Documents\\NetBeansProjects\\DatabaseRecordManager\\DatabaseRecordManager.sqlite");
        JOptionPane.showMessageDialog(null,"Grattis: You are connented with Database");
        return conn;

    }
    catch(Exception e){
       JOptionPane.showMessageDialog(null, e);           
    return null;
    }

0 个答案:

没有答案