Name
Driver
Synopsis
Every JDBC driver must implement the Driver
interface. Most programmers never need to deal with this interface,
except when using the
DriverManager.registerDriver()
method, which is
generally not recommended. The better way to register a driver is to
load the driver by calling Class.forName()
on the
driver class, which automatically register the driver as well. Older
JDBC drivers can be used to with newer versions of the API, although
some functionality will not be supported.
public interface Driver { // Public Instance Methods public abstract boolean acceptsURL( String url) throws SQLException; public abstract java.sql.Connection connect(String url, java.util.Properties info) throws SQLException; public abstract int getMajorVersion(); public abstract int getMinorVersion(); public abstract DriverPropertyInfo[] getPropertyInfo( String url, java.util.Properties info) throws SQLException; public abstract boolean jdbcCompliant(); }
Passed To
DriverManager.{deregisterDriver()
, registerDriver()}
Returned By
DriverManager.getDriver()
Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.