Need to load suitable driver for underlying database.
Different drivers & types for different databases are available.
For MS Access, load following driver available with j2se.
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);
For Oracle, load the following driver. You have to download it explicitly.
Class.forName(“oracle.jdbc.driver.OracleDriver”); Define Connection URL To get a connection, we need to specify the URL of a database (Actually we need to specify the address of the database which is in the form of URL) As we are using Microsoft Access database and we have loaded a JDBC-ODBC driver. Using JDBC-ODBC driver requires a DSN which we have created earlier and named it personDSN. So the URL of the database will be
0 Comments
Please add nice comments or answer ....