• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

connectivity

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello friends..
can you tell me why we use jdbc insted of odbc..what's the basic difference??
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JDBC is Java's standard interface to use relational databases. ODBC is another standard that does not have anything to do with Java.

Normally you want to use JDBC from a Java program, just because that's the standard, default way to use relational databases from Java. From the perspective of your program, JDBC is in principle independent of the specific brand and version of database that you use. The JDBC API uses a JDBC driver behind the scenes. That driver is specific to your particular brand and version of database: for example for Oracle you need an Oracle JDBC driver, for MySQL you need a MySQL JDBC driver, etc.

If you want to go through ODBC, then you can get a special JDBC driver that works through ODBC. But this is normally not what you want to do - it adds an unnecessary layer between your application and the database.
 
winny dhar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thankyou..
then were do we use OLE-DB?
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OLE DB is a Microsoft-specific API for accessing data in databases or from other data sources. It's not something you would normally want to use from a Java program, because it works on Windows only, and I don't even know if there's a way to use it directly from Java.
 
winny dhar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok..thanks..
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure, but I think OLEDB is Microsoft's version of JDBC - an abstraction layer to connect to databases with a uniform interface.
 
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think this discussion might fit better in our JDBC forum. Moving.
 
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic