好的,我将那句变成
try{
con=java.sql.DriverManager.getConnection(SERVANDDB,"sa","");
}
catch(Exception e){out.println(e.getMessage());}
就输出了如下信息:
[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
用eclipse编了个类似的java程序,就提示Error:no Active Connection