Sunday, 8 September 2013

SQL error unable to copy file

SQL error unable to copy file

I'v built a program, and I used SQL. It worked fine but suddenly, without
changing the code, I got the error message: Error 3 Unable to copy file
"C:\Users\user\documents\visual studio
2010\Projects\Programm\Programm\App_Data\DataBase_log.ldf" to
"bin\Debug\App_Data\DataBase_log.ldf". The process cannot access the file
'C:\Users\user\documents\visual studio
2010\Projects\Programm\Programm\App_Data\DataBase_log.ldf' because it is
being used by another process. This is my connection string:
private string ConnectionString()
{
return @"Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\App_Data\DataBase.mdf;Initial
Catalog=DataBase.mdf;Integrated Security=True;User Instance=True";
}
I'm using SQL server 2008 and Visual studio 2010. I can't figure out what
the problem is and I'd appreciate anyone who helps.

No comments:

Post a Comment