12
Answers

database with the same name exists, or specified file cannot

Jyoti Jodha

Jyoti Jodha

7y
24.3k
1
 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)