public override void loadFromDB()
{
this.connect();
SQLiteCommand command = new SQLiteCommand(connection);
SQLiteDataReader reader;
String key;
byte[] imageBytes;
command.CommandText = String.Format("SELECT id, data FROM imageData;");
reader = command.ExecuteReader();
while (reader.Read())
{
key = reader.GetString(0);
imageBytes= (System.Byte[])reader["data"];
imageCache.Add(key, this.byteArrayToImage(imageBytes));
}
command.Dispose();
this.close();
}