java.sql.SQLException: No suitable driver
我下了SQL2000的驱动,还设了环境变量,甚至我还手动把那3个JAR导了一次,刚刚还下了SP3a的补丁(3个全部安装了一遍)
还是报这个错

解决方案 »

  1.   

    确定你的jar含有com.microsoft.jdbc.sqlserver.SQLServerDriver类吗
    如果有那就是sqlserver的问题了
      

  2.   

    try{ 
         Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
         Connection con=DriverManager.getConnection(
         "jdbc:mircosoft:sqlserver://localhost1433;databasename=addressList;","sa","");
         PreparedStatement ps=con.prepareStatement("select nickname,tel from info");
         ResultSet rs=ps.executeQuery();
    catch(Exception ce){
      System.out.print(ce);
    }
    我确定含有驱动包
    而且连上我手动导入的,总共2个