我下载 SQL Server 2000 Driver for JDBC 但不支持 SQL Server 7
求 SQL Server 7 Driver for JDBC 的驱动 
 或则
  最好同时 SQL Server 7 Driver for JDBC 和 SQL Server 2000 Driver for JDBC

解决方案 »

  1.   

    http://ovh.dl.sourceforge.net/sourceforge/jtds/jtds-1.1-dist.zipThe jTDS JDBC (v1.0) drivers included with ADS work across all versions of SQL Server. There shouldn't be any need to change or update this driver. 
      

  2.   

    我刚下一个,请问 jtds-1.1-dist 又开发例子吗?
      

  3.   

    ...http://jtds.sourceforge.net/doc/  这是doc
      

  4.   

    谢谢,文档是有了,由于时间比较急,我的意思是有没有现成demo,如何连接数据库,查询,执行等
      

  5.   

    可以了,与大家共享,希望有用
          public Connection m_dbConnection;      try
           {
               // Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); 
               Class.forName("net.sourceforge.jtds.jdbc.Driver"); 
           }
           catch(ClassNotFoundException e)
           {
               e.printStackTrace();
               throw new SQLException(e.getMessage()) ;
           }
           
           try
           {
                /*根据机构编码获取数据库SQL SERVER 连接信息*/
                SQLConnectInfo info = new SQLConnectInfo(sOrgCode) ;
                String sUrl ="jdbc:jtds:sqlserver://"
                            +info.getIP()+":1433;DatabaseName="
                            +info.getDatabase()+";User="
                            +info.getUser()+";Password="
                            +info.getPassword();
                /*创建连接*/            
                //m_dbConnection = DriverManager.getConnection(sUrl);      
                
                Properties proper = new Properties() ;
                Driver driver = new Driver() ;
                //driver.acceptsURL(sUrl) ;
                m_dbConnection = driver.connect(sUrl,proper) ;
                
                /*事务模式设为不自动提交*/
                m_dbConnection.setAutoCommit(false);
           }
           catch(SQLException se)
           {
               se.printStackTrace();
               /*抛出异常*/
               throw new SQLException(se.getMessage()) ;
           }     其它查询 执行跟原来一样 只需对 Connection 进行操作即可