Load SQLite to Memory Database

Hello!

We are evaluating Sqlchipher and trying to implement it with as little impact as possible. We have problems with the “backup” the database to the memory (for faster access).
We are using simple backup command as follows:

_connection.BackupDatabase(dbInterface._connection, “main”, “main”, -1, null, 0);

If I backup database without password from HDD to memory everything works fine. If the database is encrypted I get an error:

System.Data.SQLite.SQLiteException: ‘unknown error failed to initialize backup’.

Can you give me some pointers or better c# code snippet on how to achieve that?

Best regards,

Karl

Hi @karl

SQLCipher only supported a subset of backup configuration scenarios. In this case, backing up from encrypted to plaintext format is blocked.

Thanks for response!

I used password for “inMemory” database and everything is OK now! :slight_smile:

Best regards,

Karl