本文介绍了无法使用NetBeans IDE连接到Java中的SQL Server 2000的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想连接到sqlserver 2000
我使用Netbean IDE.
我将msbase.jar,mssqlserver.jar,msutil.jar添加到驱动程序
当我想添加连接

hi I want to connect to sqlserver 2000
I Use Netbean IDE .
I add msbase.jar,mssqlserver.jar,msutil.jar to driver
when I want to add Connection

JDBC URL = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=Northwind;"


但它没有连接.错误是:建立套接字时出错"
我在服务器网络实用程序中签入,"TCP/IP"在启用协议"列表中,端口号为1433
我关闭了Windows防火墙
但现在我仍然有此错误

我也使用jdbc.jar,它连接到sql server 2008.但它也无法使用jdbc连接到sql server2000.
我该怎么办?

错误是:
"com.microsoft.sqlserver.jdbc.SQLServerException:与主机的TCP/IP连接失败.java.net.ConnectException:连接被拒绝:connect"


but it doesn''t connect .The error is : "Error establishing socket"
I check in server network utility , TCP/IP is in Enable protocols list ,and the port number is 1433
I turn off the windows firewall
but still now I have this error

I also use jdbc.jar and it connects to sql server 2008 . but it can''t connect to sql server 2000 with jdbc either.
what could I do?

error is :
"com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect"

推荐答案

jdbc:microsoft:sqlserver://localhost:1433;user=mahnoosh;password=wibbleHatStand


据我所知,您不能使用DatabaseName属性.


You can''t use the DatabaseName attribute as far as I know.



这篇关于无法使用NetBeans IDE连接到Java中的SQL Server 2000的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 13:00