http://www.microsoft.com/downloads/details.aspx?FamilyID=86212d54-8488-481d-b46b-af29bb18e1e5&DisplayLang=en

解决方案 »

  1.   

    http://download.microsoft.com/download/3/0/f/30ff65d3-a84b-4b8a-a570-27366b2271d8/setup.exehttp://download.microsoft.com/download/3/0/f/30ff65d3-a84b-4b8a-a570-27366b2271d8/mssqlserver.tar
      

  2.   

    http://download.microsoft.com/download/SQLSVR2000/Install/2.2.0022/NT5XP/EN-US/setup.exe
      

  3.   

    这些我都下了,安装时候没有被提示指定安装路径,也不知道装到什么地方去了,
    听说完全版的JDBC  for  MSSQL server的驱动是大概7M大小,你们这些都是2m大小的。
    你们看我这段程序:import java.sql.*;public class net {
        public static void main(String args[]) {
            String url = "jdbc:odbc:new";
            Connection con;
            String createString;
            createString = "create table myTABLE " +
                                "(COF_NAME VARCHAR(32), " +
                                "SUP_ID INTEGER, " +
                                "PRICE FLOAT, " +
                                "SALES INTEGER, " +
                                "TOTAL INTEGER)";
            Statement stmt;        try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            } catch(java.lang.ClassNotFoundException e) {
                System.err.print("ClassNotFoundException: ");
                System.err.println(e.getMessage());
            }        try {
                con = DriverManager.getConnection(url, "sa", "");
                stmt = con.createStatement();
                stmt.executeUpdate(createString);
                stmt.close();
                con.close();        } catch(SQLException ex) {
                System.err.println("SQLException: " + ex.getMessage());
            }
        }
    }
    我是用JDBC-ODBC桥连接到一个SQL-SERVER,数据库名字是new
    我在上面建立了myTABLE的一个表。程序运行的很成功。
    但是我现在想换成直接用JDBC  for  MSSQL server的驱动连接
    于是我换了一些代码,新的如下:import java.sql.*;public class net2 {
        public static void main(String args[]) {
            String url = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=new";
            Connection con;
            String createString;
            createString = "create table myTABLE " +
                                "(COF_NAME VARCHAR(32), " +
                                "SUP_ID INTEGER, " +
                                "PRICE FLOAT, " +
                                "SALES INTEGER, " +
                                "TOTAL INTEGER)";
            Statement stmt;        try {
                Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
            } catch(java.lang.ClassNotFoundException e) {
                System.err.print("ClassNotFoundException: ");
                System.err.println(e.getMessage());
            }        try {
                con = DriverManager.getConnection(url, "sa", " ");
                stmt = con.createStatement();
                stmt.executeUpdate(createString);
                stmt.close();
                con.close();        } catch(SQLException ex) {
                System.err.println("SQLException: " + ex.getMessage());
            }
        }
    }
    但是这就死活地被扔出个了ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    我已经被这个程序折磨了3天了,
    我知道一定是我的JDBC驱动没安装成功,
    我要怎么做啊?
      

  4.   

    ms jdbc 就是一个.jar包啊,将他放在classpath就行了。这个安装只不过拷贝文件、做个快捷建阿在安装的过程中选custom不就可以选路径拉他的默认路径在c:\program file\ 下面