Board logo

標題: [發問] 我的網站不能連接MSSQL 2008 R2 [打印本頁]

作者: him123    時間: 2013-4-29 00:06     標題: 我的網站不能連接MSSQL 2008 R2

我最近在寫一個網站.那我找了一個free web hosting.但不知道為什麼其中一頁不能連接我的資料庫..其他的都可以..
  1. Dim cts As ConnectionStringSettings = ConfigurationManager.ConnectionStrings("MembersDB")
  2.     Dim sds As New SqlDataSource(cts.ProviderName, cts.ConnectionString, "")
複製代碼
我的錯誤是:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

我煩了好幾天也沒有辦法解決.

感謝!!
作者: spe    時間: 2013-5-7 11:42

試試以下步驟
1、啟用pipes管道服務
2、開啟防火牆1433端口
3、改回電腦名稱
把電腦名還原成原來的試試。重啟,連接資料庫。
作者: baomin    時間: 2013-9-9 09:18

him123 你好
建議如果資料庫是自己架設的話,先連去資料庫看是否有通,然後針對你所說的"其中一頁不能連接我的資料庫"那個table,看是否能用,並下個語法去呼叫此table的資料。




歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)