Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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);
like image 212
rur2641 Avatar asked Apr 27 '16 20:04

rur2641


People also ask

Where is SQLite database located?

The Android SDK provides dedicated APIs that allow developers to use SQLite databases in their applications. The SQLite files are generally stored on the internal storage under /data/data/<packageName>/databases.

Is SQLite a Microsoft product?

Microsoft uses SQLite as a core component of Windows 10, and in other products. SQLite is the primary meta-data storage format for the Firefox Web Browser and the Thunderbird Email Reader from Mozilla. The Navigation Data Standard uses SQLite as its application file format.

How do I get the current date and time in SQLite?

The SQLite function DATE('now') returns the current date as a text value. It uses the 'YYYY-MM-DD' format, where YYYY is a 4-digit year, MM is a 2-digit month, and DD is a 2-digit day of the month. This function takes one argument: the text 'now' indicates the current date and time.

How do I change the date format in SQLite?

Use the STRFTIME() function to format date\time\datetime data in SQLite. This function takes two arguments. The first argument is a format string containing the date/time part pattern. In our example, we use the format string '%d/%m/%Y, %H:%M'.


2 Answers

C:\Users[Your User Name]\AppData\Local\Packages[Your Package Name]\LocalState

Your Package Name: You can find in file Package.appxmanifest in your Project Your file db.sqlite will in folder LocalState

like image 95
mrri Avatar answered Nov 01 '22 02:11

mrri


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

like image 33
Glen Thomas Avatar answered Nov 01 '22 02:11

Glen Thomas