小弟在做JAVA时出现一个问题。同一个程序,在别的机器上做可以通过。为什么在我自己的机器上执行就出现:
“java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket.”
这到底是什么原因引起的?
“java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket.”
这到底是什么原因引起的?
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
String url="jdbc:microsoft:sqlserver://localhost:1433;DataBaseName=pubs";
cn=DriverManager.getConnection(url,"sa","");
不知道对不对啊
String url="jdbc:microsoft:sqlserver://localhost:1433;DataBaseName=pubs";
你的localhost是不是应该该成你数据库的服务器IP~~:)