Hallo zusammen,
ich bekomme einfach keine Connection zu meinem Datenbankfile und brauche mal Hilfe. Was muss man denn tun, um solch eine Verbindung aufzubauen? Tante Google hilft mir gerade auch nicht weiter.
Ich verwende die IDE IntelliJ.
[CODE lang="java" title="Die Methode"] private static void open_connection(String db_path) {
Connection conn = null;
try {
// db parameters
String url = "jdbc:sqlite:" + db_path;
// create a connection to the database
conn = DriverManager.getConnection(url);
System.out.println("Connection to SQLite has been established.");
} catch (SQLException error) {
System.out.println(error.getMessage());
} finally {
try {
if (conn != null) {
conn.close();
}
} catch (SQLException ex) {
System.out.println(ex.getMessage());
}
}
}[/CODE]

ich bekomme einfach keine Connection zu meinem Datenbankfile und brauche mal Hilfe. Was muss man denn tun, um solch eine Verbindung aufzubauen? Tante Google hilft mir gerade auch nicht weiter.
Ich verwende die IDE IntelliJ.
[CODE lang="java" title="Die Methode"] private static void open_connection(String db_path) {
Connection conn = null;
try {
// db parameters
String url = "jdbc:sqlite:" + db_path;
// create a connection to the database
conn = DriverManager.getConnection(url);
System.out.println("Connection to SQLite has been established.");
} catch (SQLException error) {
System.out.println(error.getMessage());
} finally {
try {
if (conn != null) {
conn.close();
}
} catch (SQLException ex) {
System.out.println(ex.getMessage());
}
}
}[/CODE]
[CODE title="Die Error Meldung"]java.sql.SQLException: No suitable driver found for jdbc:sqlite:db_path[/CODE]db_Path =D:\CloudStation\GitHub\javaCreateSQLDataBase\create_db\src\com\createsql\files\db\db.db
