I have a database file (FinanceDB.mdf) stored on a local hard drive. I can connect to the file, but when I execute requests to it through C #, I get the following error:
An attempt to connect a database with auto-name for the file F: \ IT7x01Project \ App_Data \ FinanceDB.mdf failed. A database with the same name exists or the specified file cannot be opened or is located on a UNC share.
I set the permissions for all in the file to full access, which, as I thought, may be part of the problem, but it turns out that it does not exist (unless itβs just like setting permissions).
This is the connection string:
<add name="FinanceDBConnectionString1" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=F:\IT7x01Project\App_Data\FinanceDB.mdf;Integrated Security=True;" providerName="System.Data.SqlClient"/>
Any help with this would be appreciated.
user3859922
source
share