I am trying to connect sqlite database (using firefox based SQlite manager) ,here is my code,
And my error message;
error message:java.sql.SQLException: path to 'C:\Javaeclipse\workspace\Company\C\EmployeeData': 'C:\Javaeclipse' does not exist
Code:
import java.sql.*;
import javax.swing.*;
public class sqliteConnection {
public static Connection dbConnector() {
try {
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection(
"jdbc:sqlite:C:\\Javaeclipse\\workspace\\Company\\C\\EmployeeData.sqlite"
);
JOptionPane.showMessageDialog(null, "başardın");
return conn;
} catch(Exception e) {
System.out.println(e);
return null;
}
}
Aucun commentaire:
Enregistrer un commentaire