Java 8 JDBC ImprovementsIn Java 8, Java made two major changes in JDBC API. 1) The JDBC-ODBC Bridge has been removed.Oracle does not support the JDBC-ODBC Bridge. Oracle recommends that you use JDBC drivers provided by the vendor of your database instead of the JDBC-ODBC Bridge. 2) Added some new features in JDBC 4.2.Java JDBC 4.2 introduces the following features:
Java JDBC DriverActionIt is an interface that must be implemented when a Driver wants to be notified by DriverManager. It is added in java.sql package and contains only one abstract method. DriverAction Method
The deregister method is intended only to be used by JDBC Drivers and not by applications. JDBC drivers are recommended not to implement the DriverAction in a public class. If there are active connections to the database at the time that the deregister method is called, it is implementation specific as to whether the connections are closed or allowed to continue. Once this method is called, it is implementation specific as to whether the driver may limit the ability to create new connections to the database, invoke other Driver methods or throw a SQLException. Java JDBC4.2 DriverAction ExampleOutput: 1 Arun 25 2 irfan 22 3 Neraj kumar 25 Driver deregistered Java JDBC SQLTypeThis interface is used to identify a generic SQL type, JDBC type or a vendor specific data type. It provides following methods.
Java JDBCTypeIt is an Enumeration which defines the constants that are used to identify generic SQL types, called JDBC types. It extends java.lang.Enum and implements java.sql.SQLType. JDBCType FieldsThe following table contains constants defined in the JDBCType.
JDBCType Methods
Next TopicJava Binary Literals |