troubleshooting Question

Error Using Access Database With Visual Studio Attached To SQL Server

Avatar of Kevin Freeman
Kevin FreemanFlag for United States of America asked on
DatabasesMicrosoft SQL ServerMicrosoft Visual Studio* SSMS
4 Comments1 Solution13 ViewsLast Modified:
I am building with Visual Studio, a Project, WPF App, I have the Database.mdf (MDF) file, for the Visual Studio Project, attached to SSMS (SQL Server Management Studio) under Databases. I have SQL Server Running in SQL Server Configuration Manager and I am using a Standard User Account in Windows but have the Standard User under Security in SQL Server Management Studio. As well, I have created a Microsoft Access Database in the project and it is, Database.accdb (ACCDB), with Linked Tables in the Access File Linked to the Database.mdf. When I run the Visual Studio Program I get the following errors:

Error 1
Could not copy "C:\Users\(User)\source\repos\Program\Program\Database.mdf" to "bin\Debug\Database.mdf". Exceeded retry count of 10. Failed.   Program  
Error 2
Unable to copy file "C:\Users\(User)\source\repos\Program\Program\Database_log.ldf" to "bin\Debug\Database_log.ldf". The process cannot access the file 'C:\Users\(User)\source\repos\Program\Program\Database_log.ldf' because it is being used by another process.   Program    
Error 3
Unable to copy file "C:\Users\(User)\source\repos\Program\Program\Database.mdf" to "bin\Debug\Database.mdf". The process cannot access the file 'C:\Users\(User)\source\repos\Program\Program\Database.mdf' because it is being used by another process.   Program  
I am guessing that this is a Configuration Problem, if I Stop SQL Server in SQL Server Configuration Manager the Visual Studio Program runs but cannot login the Database.mdf file. What do I need to change to be able to run the program and link the tables in Access, Database.accdb, to the Database.mdf file?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros