• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

How to connect to a db with out a driver

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What type of database are you trying to connect to?
Does the database support ODBC?
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Today's lesson is that you can't wear a jetpack AND a cape. I should have read this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic