It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes How to connect to a db with out a driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "How to connect to a db with out a driver" Watch "How to connect to a db with out a driver" New topic

How to connect to a db with out a driver

sjhyam m

Joined: Apr 26, 2001
Posts: 7
Hi All!
Can I contact and access a database with out using a driver. Is it possible to do with Java? Please give me the required information.
Thanks in advance
Tim Lauster

Joined: Jul 09, 2001
Posts: 19
What type of database are you trying to connect to?
Does the database support ODBC?
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

My answer:
Unfortunately, you'll need a driver to connect to the database. The java.sql.* is made up of mainly interfaces(no implementation) which means that you can not use them. The drivers are used to implement these interfaces so that you can access the databases, query tables, and process the results. There is a jdbc-odbc bridge from Sun available to ODBC compliant databases...but it is not recommended(lots of headaches!)

Sun's answer:
this is how Sun describes their own Bridge:
"Note that we do not recommend using the Bridge except for experimental purposes or when you have no other driver available. "
see the complete FAQ as it is insightful on the jdbc-odbc bridge as a odbc solution.
[This message has been edited by Jamie Robertson (edited August 14, 2001).]
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
For learning purposes, the JDBC-ODBC driver will do fine. Compared to other drivers, it is much slower. So to answer your question, you can use the JDBC-ODBC driver that comes with the JDK to connect to a database as long as it supports ODBC (most do). Good luck!
Ashish Saraf

Joined: Sep 08, 2001
Posts: 14
One will have to use the driver to access the database.
As drivers are the layer between any database and the applications.
The drivers will send commands from application and receive results from the database engine. This is true for any application java is no exception.
Ashish Saraf
I agree. Here's the link:
subject: How to connect to a db with out a driver
It's not a secret anymore!