File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to connect to a db with out a driver" Watch "How to connect to a db with out a driver" New topic
Author

How to connect to a db with out a driver

sjhyam m
Greenhorn

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
Regards
Shyam
Tim Lauster
Greenhorn

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. http://java.sun.com/products/jdbc/faq.html#2
Jamie
[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
Greenhorn

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.
Regards,
Ashish Saraf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to connect to a db with out a driver
 
Similar Threads
JDBC implementions
hibernate.cfg.xml
WA #1.....word association
Low level tracing for JDBC
WTRN0017W: Encountered an error in XA recover operation