jdbc:microsoft:sqlserver://数据库ip地址:1433;DatabaseName=数据库名称
你是不是把1433改了。

解决方案 »

  1.   

    我也有同样的问题。但我是菜鸟,如何配置jdbc 驱动??
      

  2.   

    你的SQL SERVER的接口不对了,你打开SQL SERVER服务器的属性看一下接口是多少,改过来就行了.
      

  3.   

    establishing socket!接口不对,把连接语句扔出来查查看!
      

  4.   

    连接语句为下:
    <%Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();  
    String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=sunshine";  
    String user="sa";  
    String password="78785452";  
    Connection conn= DriverManager.getConnection(url,user,password);  
    Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); 
      

  5.   

    打开SQLserver的客户网络实用工具,和服务器网络使用工具,选择右边的TCP/IP的属性。看是不是“1433”
      

  6.   

    <%Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();  
    String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=sunshine";  
    String user="sa";  
    String password="78785452";  
    Connection conn= DriverManager.getConnection(url,user,password);  
    Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=sunshine";  
    1433后面是冒号,不是分号!