jdbc连接sql server 2000
jdbc 连接sql server 2000
urls="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=wzg";
try {
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
conn = DriverManager.getConnection(this.urls,this.user,this.password);
stmt = conn.createStatement();
return true;
}
catch(SQLException e) {
System.out.println(e.toString());
return false;
}
catch(java.lang.ClassNotFoundException e){
System.out.println(e.toString());
return false;
}
编译通过,运行时候出错:
java.sql.SQLException:[Microsoft][SQL Server 2000 Driver for JDBC]Error establishing socket
该如何处理??