救命 myeclipse 连接sql server 2000 连接不上Error while .....Error establishing socket
myeclipse连接sqlserver2000出问题了我用的是DBBrowser连接的Errorwhiletryingtologintodatabase,[Micros...
myeclipse 连接sql server 2000 出问题了 我用的是DB Browser连接的
Error while trying to login to database,[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket。
我补丁打了sp4 端口开了 jar包导了 (msutil.jar msbase.jar mssqlserver.jar)
我的URL jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mixin
我的driver Microsoft MSSQL Server JDBC Driver
(com.microsoft.jdbc.sqlserver.SQLServerDriver)
那位大哥帮帮忙 急呀!!!!!!!!!!!!!!!
jdbc:jtds:sqlserver://localhost:1433/mixin换乘上面这个 就报 NetWork error IOException:connection refused:connect
我换了 jar包jtds-1.2 他现在又爆error while trying to login to database:unable to create connection check your url
我的url是jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mixin
〉〉〉〉〉〉〉〉〉 展开
Error while trying to login to database,[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket。
我补丁打了sp4 端口开了 jar包导了 (msutil.jar msbase.jar mssqlserver.jar)
我的URL jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mixin
我的driver Microsoft MSSQL Server JDBC Driver
(com.microsoft.jdbc.sqlserver.SQLServerDriver)
那位大哥帮帮忙 急呀!!!!!!!!!!!!!!!
jdbc:jtds:sqlserver://localhost:1433/mixin换乘上面这个 就报 NetWork error IOException:connection refused:connect
我换了 jar包jtds-1.2 他现在又爆error while trying to login to database:unable to create connection check your url
我的url是jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mixin
〉〉〉〉〉〉〉〉〉 展开
展开全部
connection refused:connect ,这个原因一般是因为没打补丁引起的,可是你已经打了sp4了,应该没问题了。我写份连接代码你再参考下:
String url = "jdbc:jtds:sqlserver://localhost:1433/xia";
static {
try {
Class.forName("net.sourceforge.jtds.jdbc.Driver");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public Connection getConnection() {
Connection conn = null;
try {
conn=DriverManager.getConnection(url, "sa", "111");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return conn;
}
String url = "jdbc:jtds:sqlserver://localhost:1433/xia";
static {
try {
Class.forName("net.sourceforge.jtds.jdbc.Driver");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public Connection getConnection() {
Connection conn = null;
try {
conn=DriverManager.getConnection(url, "sa", "111");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return conn;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询