Saturday, 1 September 2012

How a database driver can be loaded with JDBC 4.0 / Java 6?


• By providing the JAR file , the driver must be properly configured.

• The JAR file is placed in the classpath. 

• It is not necessary to explicitly load the JDBC drivers by using the code like Class.forName() to register in the JDBC driver.

• The DriverManager class looks after this, via locating a suitable driver at the time when the DriverManager.getConnection() method is called. 

• This feature provides backward-compatibility, so no change is needed in the existing JDBC code.

No comments:

Post a Comment