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.
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
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
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?
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.