Problem Deleting Database

Jun 26, 2012 at 2:44 AM

I'm having a problem when calling Delete db more than once for the same db name

It throws an exception in DeleteDatabase() the 2nd time its called because the files already exist in the TempFolder.

await item.MoveAsync(ApplicationData.Current.TemporaryFolder);

 I put the following at the start of your example project and was able to recreate the problem I'm having:

var exists = await Database.DoesDatabaseExistsAsync(DatabaseName);
            if (exists)
                await Database.DeleteDatabase(DatabaseName);

            _database = await Database.CreateDatabaseAsync(DatabaseName, StorageLocation.Local);
            var table = await _database.Table<Person>();
            await _database.SaveAsync();
            await  Database.DeleteDatabase(DatabaseName);
            _database = await Database.CreateDatabaseAsync(DatabaseName, StorageLocation.Local);
            table = await _database.Table<Person>();
            await _database.SaveAsync();
            await Database.DeleteDatabase(DatabaseName);

 

Jun 29, 2012 at 3:24 AM

Thanks, troth.

This is fixed and new release is posted 0.6.1.0.  NuGet has been updated as well.

 

Mar 13, 2013 at 9:54 PM
troth

Here is a database compatible with WinRT:
https://www.kellermansoftware.com/p-49-ninja-winrt-database.aspx