I saw someone asking this question in the group today, so let me share my own knowledge with you. Of course, there may be something wrong, and I hope to point it out:
***msbase.jar, mssqlserver.jar, msutil.jar (supports sql2000):
Early connection database Jar package: you need to manually import the driver package when connecting data. That is, manually import class.forName (driver name);
***SQL Server JDBC Driver 2.0----sqljdbc.jar and sqljdbc4.jar
New version of JDBC connection database Jar package, supports sql2005, sql2008
Sqljdbc.jar
When using the sqljdbc.jar class library, the application must first register the driver by class.forName (driver name). Jdk1.6 or above is not recommended.
Sqljdbc4.jar
In JDBC API 4.0, the DriverManager.getConnection method has been enhanced to automatically load the JDBC Driver. Therefore, when using the sqljdbc4.jar class library, the application does not need to call the Class.forName method to register or load the driver. When the getConnection method of the DriverManager class is called, the corresponding driver is found from the set of registered JDBC Drivers. The sqljdbc4.jar file includes the "META-INF/services/java.sql.Driver" file, which contains .sqlserver.jdbc.SQLServerDriver as a registered driver. Existing applications (currently loading the driver by using the Class.forName method) will continue to work without modification.
Note: The sqljdbc4.jar class library requires Java Runtime Environment (JRE) version 6.0 or higher.