title: Visual Studio 2010 complains about database versions
body: <p>Good day once more.</p>
  
  <p>Okay so what I want to do is to keep my database in the App_Data folder for ease of use, now I thought this would be easy: Copy the database into the folder and change the connection string. But when I try that I get the horrible version error:</p>
  
  <blockquote>
    <p>The database
    'C:\USERS\GUÐMUNDUR\DESKTOP\TEST\TEST\APP_DATA\IRIS2.MDF'
    cannot be opened because it is version
    661. This server supports version 655 and earlier. A downgrade path is not
    supported. Could not open new database
    'C:\USERS\GUÐMUNDUR\DESKTOP\TEST\TEST\APP_DATA\IRIS2.MDF'.
    CREATE DATABASE is aborted. An attempt
    to attach an auto-named database for
    file
    C:\Users\Guðmundur\Desktop\Test\Test\App_Data\IRIS2.mdf
    failed. A database with the same name
    exists, or specified file cannot be
    opened, or it is located on UNC share.</p>
  </blockquote>
  
  <p>Now I was wondering if anyone can suggest a solution to this, I can recreate the database via the SQL script so there is no problem with that and there is no important (yet) information there.</p>
  
  <p>Any ideas?</p>
  
  <p>Here is the connection string:</p>
  
  <pre><code>  &lt;connectionStrings&gt;
      &lt;add name="ApplicationServices"
           connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|IRIS2.mdf;User Instance=true"
           providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
  </code></pre>
  
  <p><em><strong>The solution I used</em></strong></p>
  
  <p>I went into the SQL Server Management Studio and attached the database there while keeping it in the App_Data folder. Than I went into Visual Studio, created a new Data Connection and after it was created I clicked on it and went into Properties tab for it and selected everything from the Connection String and replaced what I originally had with it.</p>
  
  <p>So the connection string looks like this now:</p>
  
  <pre><code>  &lt;connectionStrings&gt;
      &lt;add name="ApplicationServices"
            connectionString="Data Source=WODAN;Initial Catalog=IRIS;Integrated Security=True"
            providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>Here are the instructions for the attachment process (as supplied by Ladislav Mrnka)
  msdn.microsoft.com/en-us/library/ms190209.aspx</p>
  
  <p>Thanks to everyone for their input and special thanks for Ladislav for helping me through out.</p>