There are two ways to connect to a SQL Server 2000 database in Java:
(1) Connect through Microsoft's JDBC driver. There are three files in this JDBC driver, namely Mssqlserver.jar, Msutil.jar, and Msbase.jar. However, these drivers have not been found on the Microsoft Official web, and the Sqljdbc.jar and Sqljdbc4.jar provided are not supported by SQL Server 2000.
Driver Name:Com.microsoft.jdbc.sqlserver.SQLServerDriverclassforname)
database connection Url:jdbc:microsoft:sqlserver://localhost:1433;databasename=dbname (i.e. the following )
(2) Connect via Jtds Drive. : http://sourceforge.net/projects/jtds/files/jtds/
Driver Name:Net.sourceforge.jtds.jdbc.Driverclassforname)
database connection Url:jdbc:jtds:sqlserver://localhost:1433/dbname (i.e. the following )
When you connect using the second method, you may have an error:
java.lang.unsupportedclassversionerror:net/sourceforge/jtds/jdbc/driver:unsupported Major.minor version 51.0
The JDK version number corresponds to:
J2SE 7 = Wuyi (0x33 hex),
J2SE 6.0 = (0x32 hex),
J2SE 5.0 = (0x31 hex),
JDK 1.4 = 0x30 Hex,
JDK 1.3 = (0x2F hex),
JDK 1.2 = 0x2e Hex,
JDK 1.1 = (0x2D hex).
As a result, the above error is due to Jtds needs jdk7, and the JDK version you are using is not jdk7.
Solution:
(1) Installation Jdk7
(2) Install the lower version of the Jtds (General Jtds 3.x requires JDK7)
Reference:
Http://www.blogjava.net/guming123416/articles/28002.html
Http://stackoverflow.com/questions/13403471/unsupported-version-error-using-jtds-with-scala
Jtds Java Connection SQL Server 2000 database