Content area
Full text
Two questions:
How do you connect to a Microsoft Access-based database (in a Windows system) using JDBC?</li>
In Class.forName(....) and DriverManager.getConnection(....), what driver and URL should you use?</li>
There are two techniques available for connecting to a data source using JDBC. First, if your program will talk to an ODBC data source, you can use the JDBC-ODBC bridge included with your JDK. In the case of Sun, you would use sun.jdbc.odbc.JbdcOdbcDriver.
Specifically, using Class.forName :
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
or the command line:





