jeudi 3 mars 2016

Close connection in SQLite-WinRT wrapper

How to close all database connections in SQLite-WinRT wrapper. I need to delete the sqlite database but it is throwing exception Access is denied while deleting since some connection is already using database. So I need to close all the connections before deleting.

I have tried disposing database like:

var dbFile = await StorageFile.GetFileFromPathAsync(dbPath);
db = new SQLiteWinRT.Database(dbFile); 
db.Dispose();

But it doesn't work and throws the same exception.

Thanks!

Aucun commentaire:

Enregistrer un commentaire