title: sp_attach_single_file_db Error: failed with the operating system error 5(Access is denied.)
body: <p>I'm  trying to use this DataBase that come with this sample project with from MS:</p>
  
  <p><a href="http://code.msdn.microsoft.com/ASPNET-Web-Forms-6c7197aa/sourcecode?fileId=18930&amp;pathId=365206059" rel="nofollow">http://code.msdn.microsoft.com/ASPNET-Web-Forms-6c7197aa/sourcecode?fileId=18930&amp;pathId=365206059</a></p>
  
  <p>So after I downloaded the files: I need to attach the .mdf DataBase to my Instance of MS SQL 2008.</p>
  
  <p>From Management Studio Attaching DataBase does not work and event using this command i receive the same error:</p>
  
  <blockquote>
    <p>sp_attach_single_file_db 'School.mdf', 'C:\School.mdf'</p>
  </blockquote>
  
  <hr>
  
  <p>ERROR:</p>
  
  <pre><code>Msg 5133, Level 16, State 1, Line 1
  Directory lookup for the file "C:\School.mdf" failed with the operating system error 5(Access is denied.).
  </code></pre>
  
  <p>Any idea what is wrong? Thanks for your help!</p>