求助,关于JAVA连接数据库的问题
因为才开始学习连接数据库的问题,再加上英文不怎滴。。。所以请帮我看下下面这个错误是什么意思
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at lianxi.test1.main(test1.java:28)
----------------解决方案--------------------------------------------------------
你直接copy[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket到Google就知道答案了,这个问题已被问到N次了。
----------------解决方案--------------------------------------------------------
1,可以没有打SP3以上的包
2,可能是你连的端口和数据库打开的端口不一致
----------------解决方案--------------------------------------------------------
我打了SP4的补丁,端口也是正确的啊。。。。。晕死咯
----------------解决方案--------------------------------------------------------