Hi
I run an application. This application is attempted to connect to a Access's file(this file is in Linux). But it gives me a exception "java.sql.SQLException:No suitable driver". I think that it can lack the driver. if it is so. can you tell me where can I to get?
The code is that:This run rightly in Windowss
import java.sql.*;
class Test
{
public static void main(String[] args)
{
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
;
// set this to a MS Access DB you have on your machine
String filename = "/home/jaac/java/prueba/prueba.mdb";
String database = "jdbc
dbc
river={Microsoft Access Driver (*.mdb)};DBQ=";
database+= filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end
// now we can get the connection from the DriverManager
Connection con = DriverManager.getConnection( database ,"",""
;
}
catch (Exception e) {
System.out.println("Error: " + e);
}
}
}
I run an application. This application is attempted to connect to a Access's file(this file is in Linux). But it gives me a exception "java.sql.SQLException:No suitable driver". I think that it can lack the driver. if it is so. can you tell me where can I to get?
The code is that:This run rightly in Windowss
import java.sql.*;
class Test
{
public static void main(String[] args)
{
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"
// set this to a MS Access DB you have on your machine
String filename = "/home/jaac/java/prueba/prueba.mdb";
String database = "jdbc
database+= filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end
// now we can get the connection from the DriverManager
Connection con = DriverManager.getConnection( database ,"",""
}
catch (Exception e) {
System.out.println("Error: " + e);
}
}
}