I am trying to create an external sqlite database, I follow and tested text files in the removable storage and works. So then I try to create a database in the removable Storage:
public static async Task<String> CreateDatabase(string name)
{
var folder = await FindRemovableStorage();
if (folder != null)
{
var file = await folder.CreateFileAsync(name, CreationCollisionOption.ReplaceExisting);
if(file!=null)
{
var ret = $"{folder.Name}{file.Name}";
return ret;
}
}
return null;
}
public async void ThirdCase()
{
var path =await DataLoggerService.CreateDatabase("db.dat");
var connection = new SQLite.Net.SQLiteConnection(new SQLitePlatformWinRT(), path); //Cannot Open
}
I am testing on the desktop, and returns CannotOpen. Does anyone has created a database out from the typical local folder?
More details of what I did here: datalogger
Aucun commentaire:
Enregistrer un commentaire