Topic: jdbc连数据库问题

  Print this page

1.jdbc连数据库问题 Copy to clipboard
Posted by: kumu_00
Posted on: 2005-01-06 10:16

<%Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=ex";

javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
为什么会出现这样的问题呢?
我的sql的端口是1433啊!!!!!!!!!!!!!!!!!!!!

2.Re:jdbc连数据库问题 [Re: kumu_00] Copy to clipboard
Posted by: nego_sun_java
Posted on: 2005-01-10 21:31

我也是同样错误,请高人指教。

3.Re:jdbc连数据库问题 [Re: kumu_00] Copy to clipboard
Posted by: junyuo
Posted on: 2005-01-11 09:51

I hope this link can resolve your problem

http://support.microsoft.com/default.aspx?scid=kb;en-us;313178

4.Re:jdbc连数据库问题 [Re: kumu_00] Copy to clipboard
Posted by: lele
Posted on: 2005-01-12 17:26

kumu_00 wrote:
<%Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=ex";

javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
为什么会出现这样的问题呢?
我的sql的端口是1433啊!!!!!!!!!!!!!!!!!!!!

曾经碰到过这样的问题,原因是在windows2003 server上使用sqlserver2000,解决的办法是安装sqlserver最新的service pack,我记得好像是service pack 3,good luck

5.Re:jdbc连数据库问题 [Re: kumu_00] Copy to clipboard
Posted by: nego_sun_java
Posted on: 2005-01-13 00:05

我用的就是 window2003英文企业版 ,sqlserver打了最新补丁但还是有这个问题。请指教!

6.Re:jdbc连数据库问题 [Re: kumu_00] Copy to clipboard
Posted by: lele
Posted on: 2005-01-13 13:00

javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
端口的问题,装了sp3还没有解决的话,看看是不是你改动了socket的设置,先用telnet看看端口的状态

7.Re:jdbc连数据库问题 [Re: kumu_00] Copy to clipboard
Posted by: kumu_00
Posted on: 2005-01-24 10:23

呵呵,看来不少同病相怜的吗。
我已经解决了,不仅要sql 打sp3补丁。jdbc业同样要打补丁到sp3(应该是).

8.Re:jdbc连数据库问题 [Re: kumu_00] Copy to clipboard
Posted by: YuLimin
Posted on: 2005-01-28 22:51

1、下载Microsoft SQL Server 2000 Service Pack 3a并安装,SQL请选用混和安装模式!!!
http://www.microsoft.com/downloads/details.aspx?FamilyId=90DCD52C-0488-4E46-AFBF-ACACE5369FA3&displaylang=zh-cn

2、下载SQL Server 2000 Driver for JDBC Service Pack 3
http://www.microsoft.com/downloads/details.aspx?FamilyId=07287B11-0502-461A-B138-2AA54BFDC03A&displaylang=en

3、运行时关闭防火墙


   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