[RombaSharp] Write rest of UpdateDatabase code

This commit is contained in:
Matt Nadareski
2016-09-02 13:03:00 -07:00
parent 2328e71017
commit 443164e3c9

View File

@@ -423,11 +423,18 @@ namespace SabreTools
}
}
}
}
// At this point, we should have everything that needs to be added, added
// Now we have to remove any files associated with Dats that are no longer
// around.
// Now loop through and remove all references to old Dats
// TODO: Remove orphaned files as well
foreach (string dathash in databaseDats)
{
query = "DELETE FROM data WHERE key=\"dat\" AND value=\"" + dathash + "\"";
using (SqliteCommand slc = new SqliteCommand(query, dbc))
{
slc.ExecuteNonQuery();
}
}
}
}
}
}