0

I created a SQL Lite database and embbed in my app as a android asset the question is where the heck is the file stored on the device I used the following code to access the database

public Database()
{           
    var path = Path.Combine(System.Environment.
     GetFolderPath(System.Environment.
     SpecialFolder.Personal), "StockApp.db");

     Console.Write("OPening Database dbPath" + path);

     database = new SQLiteAsyncConnection(path);
 }

When I search for the file i cannot find it but when I use the internal debugger it puts the file at the following location.

It finds it fine and it does place a row in the table

path "/data/user/0/com.companyname.StockApp/files/StockApp.db" string

But where is the actual file I have a STK7 DEVICE for testing so Do any ideas?

enter image description here

enter image description here

enter image description here

Cœur
  • 37,241
  • 25
  • 195
  • 267
c-sharp-and-swiftui-devni
  • 3,743
  • 4
  • 39
  • 100
  • https://learn.microsoft.com/en-us/xamarin/android/app-fundamentals/resources-in-android/android-assets?tabs=macos – Jason May 18 '19 at 12:51
  • Possible duplicate of [Reading sqlite file from asset folder](https://stackoverflow.com/questions/20857734/reading-sqlite-file-from-asset-folder) – Raymond Nijland May 18 '19 at 14:28
  • @RaymondNijland i no where the file is in memory but i want the physicall file to look at it in sqllite studio – c-sharp-and-swiftui-devni May 18 '19 at 14:51
  • @rogue,If you want to get sqlite database local file path, I suggest you can take a look:https://stackoverflow.com/questions/44638086/xamarin-sqlite-local-file-path and https://forums.xamarin.com/discussion/61402/how-to-access-a-database-file-when-the-device-is-connected-to-a-computer – Cherry Bu - MSFT May 20 '19 at 09:24

0 Answers0