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 What is ODBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "What is ODBC" Watch "What is ODBC" New topic
Author

What is ODBC

Rashmi Pant
Greenhorn

Joined: Dec 19, 2007
Posts: 25
Please tell me what is Open Database Connectivity(ODBC).
In case of Type1 driver we say that this driver cponverts jdbc call to odbc function calls what is the meaning of this statement.What type of conversion is this.
Thanks
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14278
    
  21

Try Google:
http://www.tech-faq.com/odbc.shtml
http://www.webopedia.com/TERM/O/ODBC.htm
http://en.wikipedia.org/wiki/Open_Database_Connectivity

ODBC is an interface that software can use to interact with a database. Java has its own database API, JDBC. Sun has a JDBC driver which connects to a database via ODBC:

Java program <--> JDBC <--> ODBC <--> Database


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Kamal Sharif
Greenhorn

Joined: Mar 20, 2008
Posts: 1
But for SQL Server 2005,is it preferred to use ODBC bridge or using the native JDBC driver by Microsoft? I have done many tests and in all the tests ODBC seems faster and I am confused as why bothering with JDBC Driver at all?
Thanks
Kamal
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

When you are communicating with MSSql directly in an all-windows environment, ODBC may be faster.

JDBC can't talk directly to ODBC and therefore needs a bridge, so then you have

Java app -> JDBC -> JDBC-ODBC Bridge -> ODBC -> MSSql

You don't need to talk via the bridge, and the JDBC-ODBC Bridge is not great - it was never meant to be. Instead (when using Java) it is better to use the Type-4 (native dtaabase) driver if available, giving you:

Java app -> JDBC -> Native driver -> MSSql
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Originally posted by Kamal Sharif:
But for SQL Server 2005,is it preferred to use ODBC bridge or using the native JDBC driver by Microsoft? I have done many tests and in all the tests ODBC seems faster and I am confused as why bothering with JDBC Driver at all?
Thanks
Kamal


You might try jTDS. I've no idea about perfomance (it has never been an issue for me using a type 4 driver against any database), but it is generally a better product that MS's own driver.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
wood burning stoves
 
subject: What is ODBC