2017-11-25 310 views
0

我仍然面临这个问题已经有2天了。看起来我对谷歌做了一些研究,还有堆栈溢出。我按部就班,但仍然没有运行。Netbeans连接到SQLSERVER仍然没有正在运行

-> Enable SQL BROWSER

-> Enable TCP/IP PORT and change to 1433

我试过但仍然没有工作。它仍然给我这个错误。

Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: The connection to the host ., named instance sqlexpress has failed. Error: "java.net.UnknownHostException: .". Verify the server and instance names, check that no firewall is blocking UDP traffic to port 1434, and for SQL Server 2005 or later verify that the SQL Server Browser Service is running on the host.

这是我的连接代码:

Connection conn = DriverManager.getConnection("jdbc:sqlserver://.\\sqlexpress;user=sa;password=;database=pharmacy_posic"); 

我的服务器名称:\ SQLEXPRESS

我的用户名:SA

我的密码:(空白)

上午我在连接上犯了什么错误?

回答

相关问题