title: Why do I get "Database already exists" when I'm using "AttachDbFileName" when I move the solution to another directory?
body: <p>I have an application JigSaw that uses a database <code>TopScores.mdf</code> which it is not included in the project. What I want to do is make the application find the database in application's folder. So for example if I move the <code>.exe</code> file and the database file from debug folder to desktop the application should use the database from desktop and not search for it in debug folder. </p>
  
  <p>If I let them in debug folder there is no problem and the connection to database is established, but when I put them on desktop I get this : </p>
  
  <blockquote>
    <p>Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. Database 'D:\Programing\Projects Visual Studio 2010\JigSaw\JigSaw\bin\Debug\TopScores.mdf' already exists. Choose a different database name. Cannot attach the file 'C:\Users\Addy\Desktop\Jigsaw\TopScores.mdf' as database TopScores.mdf</p>
  </blockquote>
  
  <p>My connection string is :</p>
  
  <pre><code>string appPath = Path.GetDirectoryName(Application.ExecutablePath);
  string connString = @"server  =.\sqlexpress; Database=TopScores.mdf; trusted_connection=TRUE; AttachDbFileName= "+@appPath+@"\TopScores.mdf";
  conn = new SqlConnection(connString);
  </code></pre>
  
  <p>Sorry for my bad english :(</p>