0

I am trying to make jdbc-Odbc connection without making the DSN but is throwing the exception. I am using the following code and it is throwing data source name not found no default driver specified exception.

try
{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection(
        "Jdbc:Odbc:Driver={Microsoft Access Driver(*.mdb)}; Dbq=d:/new folder/db1.mdb;");
}
catch(Exception ex)
{   
    ex.printStackTrace();
}

suggest me whats wrong in this code.thanks in advance

Jacob
  • 14,463
  • 65
  • 207
  • 320
adesh
  • 1,157
  • 3
  • 18
  • 28

0 Answers0