Topic: 连接sql server的问题

  Print this page

1.连接sql server的问题 Copy to clipboard
Posted by: brolinuk
Posted on: 2006-03-23 05:46

还是关于 [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket报错的问题. 在坛子里看了很多文章, 可是仍然不解决问题.

我使用xp professional sp2 + sql 2000 个人版 sp4. 防火墙已经关掉并且在exception中添加了 sqlserver. TCP在服务器实用网络工具中是enable的. 不知道我还有哪里没有配置好. 运行jsp的时候总是报上面的错. 我都快要疯掉了. 哪位大侠帮帮我.

<% Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
String url="jdbc:microsoft:sqlserver://cohl:1435;DatabaseName=tickerpicker";
String user="ticker";
String password="1qaz2wsx";
Connection conn=DriverManager.getConnection(url,user,password);
Statement stmt=conn.createStatement();
String sql="select * from COMPANY_DETAILS";
ResultSet rs=stmt.executeQuery(sql);
while(rs.next()){
out.println(rs.getString(2));
}
%>

2.Re:连接sql server的问题 [Re: brolinuk] Copy to clipboard
Posted by: why
Posted on: 2006-03-27 02:33

jdbc:microsoft:sqlserver://cohl:1435
Are you sure you have set up properly for port 1435? (e.g. TCP/IP Default Port in Network Utility)

3.Re:连接sql server的问题 [Re: brolinuk] Copy to clipboard
Posted by: jeason1914
Posted on: 2006-04-07 12:21

我也遇到过此问题

4.Re:连接sql server的问题 [Re: brolinuk] Copy to clipboard
Posted by: K_P_exciting
Posted on: 2006-05-19 21:39

端口是1433!!!而且要安装了SQL Server 2000 sp4补丁才会打开!!


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923