我正在运行Visual Studio 2010
和SQL Server 2008 Express
版本。我在 SQL 中创建了一个名为Hangman.mdf的数据库。然后在Visual Studio
我将SqlDataAdapter
对象拖到我的表单中,它会调出向导,在数据源下的向导中,我选择Microsoft SQL Server Database File
(SqlClient),然后浏览到我的Hangman.mdf文件。当我单击测试连接时,它会抛出此错误:
Unable to open physical file "C:\XXX\Hangman.mdf". Operating system error 5: "5(Failed to retrieve text for this error. Reason: 15105)" An attempt to attach an auto named database for file C:\XXX\Hangman.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
我在奔跑Windows 8
,我已经敞开心扉Visual Studio
了。SQL Server
Administrator
我将不胜感激任何帮助。
谢谢