I often get SQLiteDoneException when querying a single value, why?

I often get SQLiteDoneException,

06-29 02:03:34.816: WARN/System.err(30470): android.database.sqlite.SQLiteDoneException: not an error 06-29 02:03:34.816: WARN/System.err(30470): at android.database.sqlite.SQLiteStatement.native_1x1_string(Native Method) 06-29 02:03:34.816: WARN/System.err(30470): at android.database.sqlite.SQLiteStatement.simpleQueryForString(SQLiteStatement.java:154) 06-29 02:03:34.826: WARN/System.err(30470): at android.database.DatabaseUtils.stringForQuery(DatabaseUtils.java:669) 06-29 02:03:34.826: WARN/System.err(30470): at android.database.DatabaseUtils.stringForQuery(DatabaseUtils.java:652) 

Am I doing something wrong?

+4
source share
2 answers

From docs :

An exception indicating that SQLite is running. Thrown when one expects a string (for example, simpleQueryForString () or simpleQueryForLong ()) does not receive one.

I do not think this is very important, but this is a warning.

+10
source

From the SQLiteStatement simpleQueryForLong code:

 @throws android.database.sqlite.SQLiteDoneException if the query returns zero rows 
+2
source

Source: https://habr.com/ru/post/1314133/


All Articles