Trouble with .mdbAny help is apreciated
Hi
I need to access an .mdb file.
Im trying to make a program that will allow me to extract the data from the .mdb and place it in a SQL database.
The code below results in a java.sql.SQLException: No suitable driver.
I've tried putting all sorts of things into the DriverManager.getConnection(), but I haven't been able to make it work.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
/* MDBReader.java
* Created on 3. oktober 2006, 13:16
* @author Leviathan
*/
publicclass MDBReader
{
/** Creates a new instance of MDBReader */
public MDBReader()
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection(""+this.getClass().getResource("OtraLink.mdb"));
Statement stm = con.createStatement();
ResultSet rs = stm.executeQuery("select * from *");
System.out.println(rs.toString());
con.close();
}
catch (ClassNotFoundException ex)
{
ex.printStackTrace();
}
catch(SQLException ex)
{
ex.printStackTrace();
}
}
publicstaticvoid main(String[] args)
{
MDBReader mdbReader =new MDBReader();
}
}
I've spent the better part of a day browsing this forum and google, but I have nothing to show for it.
Any help will be apreciated.

