資料庫隨著程式走,但 SQL Server Express 沒有啊?
依你的描述,你應該是用 SQL Server Express,你的測試用電腦可能沒有安裝。
所以請在測試用電腦安裝,並且確認 instance name 為 SQLEXPRESS,不然你就
要修改你的連線字串,以指向正確的 SQL Server Express instance。
※ 引述《catjimmy (cat)》之銘言:
: 目前小弟在自己的電腦上使用Visual Studio2010將程式建置成功沒有問題也可使用
: ,然後我將Project中的Debug資料夾複製到一台測試用的電腦上執行exe檔,卻發現
: 會跳出錯誤
: "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)."
: Google了一下卻發現都是調教我自己本機的部分,但我所使用的方法是直接在方案總管
: 新增一個資料庫,這樣不是應該是資料庫隨著程式走嗎? 應該不是遠端連線吧? 我該如
: 何解決呢,請指點迷津T_T
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.38.234.250