Skip to Main Content
JDBC Pocket Reference
book

JDBC Pocket Reference

by Donald Bales
January 2003
Intermediate to advanced content levelIntermediate to advanced
176 pages
5h 3m
English
O'Reilly Media, Inc.
Content preview from JDBC Pocket Reference
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
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro Couchbase Server, Second Edition

Pro Couchbase Server, Second Edition

David Ostrovsky, Mohammed Haji, Yaniv Rodenski
Pro Couchbase Server

Pro Couchbase Server

David Ostrovsky, Yaniv Rodenski

Publisher Resources

ISBN: 9780596528713