我也碰到这个问题了,不但是自己手写的Code,还是Jbuilder中链接,都是这个提示:
[Microsoft][SQL Server JDBC Driver]Error Establishing socket
下面是我的代码,虽然我暂时用JdbcOdbc桥绕过去了这个问题,但最终还是要解决的。
public static void main( String args[])
{
try
{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
String url="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=Report";
String user="sa";
String password="";
Connection conn= DriverManager.getConnection(url,user,password); 
if ( conn != null)
{
   conn.close();
}
             }
catch(Exception e)
{
  System.out.println(e);
}
       }