Jyoti Jodha

Jyoti Jodha

  • NA
  • 1.7k
  • 395.2k

database with the same name exists, or specified file cannot

Jul 4 2017 4:25 AM
 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)