想知道SQL Server 2008 R2 Express版本是否可以與C#Express 2010一起使用?嘗試將「基於服務的數據庫」項添加到我的項目時,出現以下錯誤。在C#Express 2010上使用SQL Server 2008 R2 Express
請注意,我只有SQL Server 2008 R2 Express。
更新1 - 我檢查服務(MSSQLSERVER
)和它的啓動和運行,我的SQL Server中有沒有錯誤2008 R2安裝任何的PC沒有安裝任何SQL Server早期版本。
實際的錯誤:
Connections to SQL Server database files (.mdf) require SQL Server 2005 Express or SQL Server 2008 Express to be installed and running on the local computer. The current version of SQL Server Express can be downloaded at the following URL: http://go.microsoft.com/fwlink/?LinkId=125883
感謝。
你的**連接字符串**看起來像什麼?另外:你不一致 - 你在標題中提到了Express版本,但在你談論** 2008 R2 **的問題中(沒有提及任何關於「Express」的內容),而且服務名稱似乎也指向了已安裝的非Express版本。那麼它是快遞還是不快? –
@marc_s我根本沒有連接字符串,因爲我沒有實際的數據庫,我希望能夠在VS2010 Express中創建它。 – user1514042
請參閱[本](http://stackoverflow.com/questions/9127359/how-to-add-sql-server-database-file-mdf-in-visual-studio-without-installing-s)和[this] (http://stackoverflow.com/questions/3487067/connection-string-problem-with-new-asp-net-website-template)..通過'AttachDBFilename'附加到數據庫只有當你使用其中一個產品的快速版本。所以它不適用於開發者版本。 由於用戶實例將在未來版本的SQL Server中被刪除,因此您可能不應該使用它。 –