Dumb question: I assume this works for a plain file (minus the encryption stuff)? Have you tried specifying the actual length of the key instead of -1? Is step (4) called immediately after (3), or in a different session? Do you need to call 'sqlite3_activate_see' again?