I have this code, which restore message queue (serialized) from SQLite
public void Restore()
{
    try
    {
        const string databaseName = @"C:\Code\C#\WcfService\WcfService\mainDB.db3";
        SQLiteConnection connection = new SQLiteConnection(string.Format("Data Source={0};", databaseName));
        connection.Open();
        try
        { 
            SQLiteCommand command = new SQLiteCommand("SELECT * FROM dump ORDER BY DId DESC limit 1", connection);
            SQLiteDataReader reader = command.ExecuteReader();
            while (reader.Read())
            {
                var info = (byte[])reader["DBinaryData"];
                Queue<Message> deserializedData = GetDeserializedMessages(info);
                var data = MergeQueueMessage(deserializedData);
                Logger.Log(data.ToString());
            }
        }
        finally
        {
            connection.Close();
        }
    }
    catch (Exception e)
    {
        Logger.Log(e.Message);
    }
}
    public Queue<Message> GetDeserializedMessages(byte[] source)
    {
        Queue<Message> messages = null;
        using (MemoryStream memoryStream = new MemoryStream(source))
        {
            BinaryFormatter formatter = new BinaryFormatter();
            messages = (Queue<Message>)formatter.Deserialize(memoryStream);
        }
        return messages;
    }
But i have a problem: can't deserialize information from field "DBinaryData"; My table in DB contain:
- DId (integer, primary key)
- DTime (Text)
- DBinaryData (Blob) // dump of message queue as serialized object
 
    