The SQL server2008 JDBC Jar package, downloaded from Microsoft's website, contains two jar packages (Sqljdbc.jar and Sqljdbc4.jar) after decompression. Which one should we use?
Address:
Http://www.microsoft.com/downloads/details.aspx?FamilyID=a737000d-68d0-4531-b65d-da0f2a735707&displayLang=zh-cn
To support backward compatibility and possible upgrade scenarios, JDBC Driver 2.0 includes 2 JAR class libraries in each installation package:Sqljdbc.jar and Sqljdbc4.jar.
JAR |
description |
Sqljdbc.jar |
Sqljdbc.jar The class library provides support for JDBC 3.0. The Sqljdbc.jar Class library requires the use of version 5.0 of the Java Runtime Environment (JRE). When connecting to a database, use on JRE 6.0; Sqljdbc.jar throws an exception. Note: The  JDBC Driver 2.0 does not support JRE 1.4. When using JDBC Driver 2.0, you must upgrade JRE 1.4 to JRE 5.0 or later. In some cases, you may need to recompile your application because it may be incompatible with JDK 5.0 or later. For more information, please refer to the documentation on the Sun Microsystems website. |
Sqljdbc4.jar |
Sqljdbc4.jar Class Library provides support for JDBC 4.0. It includes not only Sqljdbc.jar All features, but also the new JDBC 4.0 method. The Sqljdbc4.jar Class library requires a 6.0 or later version of the Java Runtime Environment (JRE). Use on JRE 1.4 or 5.0; Sqljdbc4.jar throws an exception. Note: should use &NBSP if the application must be running on JRE 6.0, even if the application does not use the JDBC 4.0 feature; Sqljdbc4.jar . |
Note that although the driver is intended to work with all major Sun equivalent Java virtual machines and is supported by these virtual machines, it is tested on Sun JRE 5.0 or later.
Note: JRE6 to choose Sqljdbc4.jar