Search code examples
c#sqlitedatabase-connectionwin-universal-app

sqlite database location uwp


I have an uwp app with a sqlite database that works as intended; I can close the program and restart it and the database is loaded properly. I want to look at the database with a database viewer but can't locate the file. I have tried unhiding files and searching for db.sqlite. Here is the code that connects to the database:

string path;
SQLite.Net.SQLiteConnection conn;
path =Path.Combine
(Windows.Storage.ApplicationData.Current.LocalFolder.Path,"db.sqlite");
conn = new SQLite.Net.SQLiteConnection(new
SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), path);

Solution

  • If you go to

    C:\Users\[YourUserName]\AppData\Local\Packages\

    your application will have its own folder there, which you may be able to recognise by name or do a search for sqlite, and the SQLite database file should be within your applications folder