
DriverManager
98
|
JDBC Pocket Reference
finds a suitable driver, it attempts to establish a connection using
that driver.
Methods
static void deregisterDriver(Driver driver)
throws SQLException
Removes a JDBC driver from driver manager’s list.
static Connection getConnection(String url)
throws SQLException
Attempts to establish a connection to a database using only
information in the specified URL.
static Connection getConnection(String url, Properties info)
throws SQLException
Attempts to establish a connection to a database using infor-
mation in the specified URL and
Properties object.
static Connection getConnection(String url, String user,
String password) throws SQLException
Attempts to establish a connection to a database using infor-
mation in the specified URL, user, and password.
static Driver getDriver(String url) throws SQLException
Attempts to locate a driver that understands the specified
URL.
static Enumeration getDrivers( )
Returns an enumeration of all currently loaded JDBC drivers.
static int getLoginTimeout( )
Returns the maximum time that the driver can wait when
attempting to log in to a database, in seconds.
static PrintWriter getLogWriter( )
Returns the current log writer. (Java 1.2)
static void println(String message)
Prints a message to the log.
static void registerDriver(Driver driver) throws SQLException
Registers the specified driver.
static void setLoginTimeout(int seconds)
Sets the