当前位置: 代码迷 >> J2SE >> jdbc连sqlserver2000总提示异常,小弟我已导入了那三个jar包
  详细解决方案

jdbc连sqlserver2000总提示异常,小弟我已导入了那三个jar包

热度:148   发布时间:2016-04-24 17:45:34.0
jdbc连sqlserver2000总提示错误,我已导入了那三个jar包?
错误的提示内容为:
java.sql.SQLException:   [Microsoft][SQLServer   2000   Driver   for   JDBC]Error   establis
hing   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   Sou
rce)
                at   com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown   S
ource)
                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   TestDB.getConnection(TestDB.java:25)
                at   TestDB.displayDbProperties(TestDB.java:42)
                at   TestDB.main(TestDB.java:78)
Error   Trace   in   getConnection()   :   [Microsoft][SQLServer   2000   Driver   for   JDBC]Erro
r   establishing   socket.
Error:   No   active   Connection
Press   any   key   to   continue...

------解决方案--------------------
打mssql的sp4补丁……
------解决方案--------------------
数据库应为混合模式,2000的补丁SP4,SQLJDBC有自己的连接示范,测试下看看结果
  相关解决方案