Im trying to create a sqlLite db. This code works and create the db and allow me do insert and select.
string dbPath = Path.Combine(
System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal),
"ormdemo.db3");
//dbPath = "/storage/emulated/0/DCIM/ormdemo.db3";
var db = new SQLiteConnection(dbPath);
db.CreateTable<Stock>();
Right now the dbPath returned is:
"/data/user/0/MyFirstGPSApp.MyFirstGPSApp/files/ormdemo.db3"
But when I use a sqlLite Manager to try open the db I cant find the folder /data/user
Where is that folder /data/user
?
The sqlLite have the option to open "APP" databases, but when try to select MyFirstGPSApp
say need a root device.
The starting folder for sqlLite is /storage/emulated/0
and have a sub folder /DCIM
So I try to use a folder I can see ... like /storage/emulated/0/DCIM/ormdemo.db3
but then the new SQLiteConnection(dbPath)
give me this error.
SQLite.SQLiteException: Could not open database file: /storage/emulated/0/DCIM/ormdemo.db3 (CannotOpen)
Do I need special permision to write in /DCIM
folder?