2017-11-25 312 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

我的密碼:(空白)

上午我在連接上犯了什麼錯誤?

回答

相關問題