12
Reply

database with the same name exists, or specified file cannot

Jyoti Jodha

Jyoti Jodha

Jul 4 2017 4:25 AM
491
 I've got a problem connecting to my Database. I get this error
 
An attempt to attach an auto-named database for file D:\abc\abc\bin\Debug\test.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
 
 my connection string :
 
<connectionStrings>
<add name="abc.Properties.Settings.abcConnectionString"
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\test.mdf;Integrated Security=SSPI" />
</connectionStrings> 

Answers (12)