頁: [1]
|
 |
|
作者
|
主題: 求助∶ ASP.NET與SQL Server 2005 連接 (閱讀 963 次)
|
msy

離線
文章: 1
|
資料庫∶Student.mdf User ID∶SA Password∶12345
連接程式碼∶
Dim ConnString As String ConnString = "Data Source=None;" & _ "User ID=SA;Password=12345;" & _ "Initial Catalog=Student" MyCon=New SqlConnection(connstring) Mycon.Open()
結果與資料庫的連接設定出現問題,
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
請問要如何更正SQL Server連接設定? (拜托,詳細些)
|
|
|
|
|
已記錄
|
|
|
|
小誌

離線
會員性別: 
文章: 573
 Windows XP SP2 P4 1.6G Office 2003
|
Express、Evaluation 以及 Developer 版本預設只允許本機用戶端連接。 Enterprise、Standard 以及 Workgroup 版本可接聽透過 TCP/IP 連接的遠端用戶端連接。
在SQL Server 2000裡面只要從enterprise manager裡面點選要開放的server, 右鍵->內容就可以設定了. SQL Server 2005要如何啟動remote connection呢? 1.開始->程式集->Microsoft SQL Server 2005->組態工具 選擇SQL Server Configuration Manager與SQL Server 介面區組態
2.在SQL Server 介面區組態裡面,選擇「服務與連接的介面組態」
3.左邊先選擇遠端連接,右邊點選本機與遠端連接->只使用TCP/IP
4.在SQL Server Configuration Manager左邊點選MSSQLSERVER的通訊協定, 右邊選選TCP/IP,右鍵->啟用
如此一來,你的SQL Server 2005就可以遠端連接囉!
|
|
|
|
|
已記錄
|
|
|
|
頁: [1]
|
|
|
|
|