Buonasera a tutti,
ho scritto una classe Java che accede ad un database Access, utilizzando un riferimento assoluto del tipo:
public void dbConnection() {
try{
// Load the Driver class file
String dbpath = "C:\\Access\\database.mdb";
String fullConnectionString = "jdbcdbc
river={Microsoft Access Driver (*.mdb)};DBQ="
+ dbpath;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection(fullConnectionString);
}
catch (SQLException se) {
System.out.println("SQL Error while connecting to the database : "+
se.toString());
} catch (Exception ne) {
System.out.println("Other Error while connecting to the database : "+
ne.toString());
}
}
Avete idea di come trasformare il riferimento al database Access da assoluto a relativo?
Kisses,
Nat