This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes jdbc and Driver Manager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "jdbc and Driver Manager" Watch "jdbc and Driver Manager" New topic

jdbc and Driver Manager

Kevin Fonner

Joined: Sep 20, 2001
Posts: 21
I was reading that the java.sql.DriverManager provides basic services for managing JDBC drivers. However, I can also choose not to register the driver with the DriverManager and just make a direct connection.
What am I looking at here and how do I choose whether or not to use the Driver Manager.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

I always use the DriverManager, but maybe that's because I didn't learn the other way of diong it.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
uma sakthi

Joined: Feb 02, 2001
Posts: 11
It is always good to register the drivers with the driver manager. This is a factory pattern. Good programming practice to always access the implementation( that is the driver) through a factory( that is the driver manager) . This results is low coupling
I agree. Here's the link:
subject: jdbc and Driver Manager
It's not a secret anymore!