第一步:下载安装MicrosoftSQLServer2000ServicePack4,也就是sql2000的sp4补丁地址如下:=8e2dfc8d-c20e-4446-99a9-b7f0213f8bc5&displaylang=zh-cn第二步:下载jdbc的驱动,解压到任一位置中,下载地址:=a737000d-68d0-4531-b65d-da0f2a735707第三步:就是创建一个java工程,再在windows-preferences-java-installedjres再用下面的代码测试下:importjava.sql.Connection;importjava.sql.DriverManager;importjava.sql.ResultSet;importjava.sql.Statement;publicclassConnectAccess{publicstaticvoidmain(String[]args){try{Class.forName(com.microsoft.sqlserver.jdbc.SQLServerDriver);Connectioncon=DriverManager.getConnection(jdbc:sqlserver://localhost:1433;DatabaseName=pubs,sa,123456);Statementstmt=con.createStatement();ResultSetrs=stmt.executeQuery(selectfname,minit,lnamefromemployee);while(rs.next()){System.out.print(\tfname:+rs.getString(1));System.out.print(\tminit:+rs.getString(2));System.out.print(\tlname:+rs.getString(3));System.out.println();}rs.close();stmt.close();con.close();}catch(Exceptione){e.printStackTrace();}}}成功了,哈哈!!!运行代码前一定要先运行sql服务器,别忘了哦!!!