title: Save SQLite database into Documents Folder win Windows Store App
body: <p>I've been writing a Windows 8 Store App using XAML and C# and the target device is a Windows Surface tablet.</p>
  
  <p>Within my application I use a SQLite database.</p>
  
  <p>To create/load the database I use the following code:</p>
  
  <pre><code>DBPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "MyDatabase.sqlite");
  </code></pre>
  
  <p>However I'd like to store the database in the Documents folder so I tried the follow line of code to replace my line above :</p>
  
  <pre><code>DBPath = Path.Combine(Windows.Storage.KnownFolders.DocumentsLibrary.Path, "MyDatabase.sqlite");
  </code></pre>
  
  <p>When I try this I get the following error: </p>
  
  <pre><code>WinRT information: Access to the specified location (DocumentsLibrary) requires a capability to be declared in the manifest.
  </code></pre>
  
  <p>So I open Package.appxmanifest and select Documents Library under capabilities and under the declarations tab I've added a File Type Association. Then under Properties I've entered 
  sqlite in the Name box and .sqlite in the File type box. I've entered no other information on the Package.appxmanifest screen.</p>
  
  <p>Now when I run the app I receive the following error: </p>
  
  <pre><code>Could not open database file: MyDatabase.sqlite (CannotOpen)
  </code></pre>
  
  <p>When I inspect Windows.Storage.KnownFolders.DocumentsLibrary.Path it equals "". I would have expected the full location path here.</p>
  
  <p>Can anyone help and has anybody ever saved a SQLite database to the documents folder?</p>
  
  <p>Thanks in advance.</p>