-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net.zetetic.database.sqlcipher.SQLiteException: unknown error (code 0): Queries can be performed using SQLiteDatabase query or rawQuery methods only. #6
Comments
Hi @Chozzle The API is slightly different between the legacy and new version of SQLCipher for Android. The Footnotes |
i have the same problem android.database.sqlite.SQLiteException: SQL logic error (code 1): , while compiling: SELECT COUNT(*) FROM sqlite_schema; here is my code :
|
Hi @xuhongchang, Try calling |
What is the difference between executeForString and executeForLong besides the different return value types? |
There's still a problem. from android-database-sqlcipher 3.5.9 to sqlcipher-android4.5.6 (1) SQL logic error in "SELECT COUNT() FROM sqlite_schema;" |
Hi @xuhongchang, It is difficult to say what the cause of your error is currently. As you are migrating from version 3.x to 4.x, I would recommend trying to perform the migration locally on your host machine first to make sure the migration is working properly outside of the device with the correct key material. You can use the SQLCipher command line shell to do this. It is interesting that the error message you are receiving a SQL logic error and the output contains the following:
which is missing the |
I made a mistake up there.The query does not have a lesser * number,and execute in post key method environments:from android-database-sqlcipher 3.5.9 to sqlcipher-android4.5.6 error log:
how to use shell command to migrate? |
Hi @xuhongchang, When you have the SQLCipher command line shell, you can provide the key material and perform the Footnotes |
I am trying to handle migration for SQLCipher 3 to 4 using a
SQLiteDatabaseHook
. This code fails with the error:net.zetetic.database.sqlcipher.SQLiteException: unknown error (code 0): Queries can be performed using SQLiteDatabase query or rawQuery methods only.
However there is a workaround to use one of the other methods which returns a value. It seems like the default execute method isn't compatible with the latest Android restrictions. This code works:
The text was updated successfully, but these errors were encountered: