I\'m operating on an SQLite3 database in my android app. I just read from the pre populated database that has 200k rows and 14 columns. Entries are words. Datatype
Error -12 means cursor leak. Pls try close it as follow:
try {....} finally { cursor.close();}
I was quering in a loop. And closing the cursor inside the loop and not outside solved the problem.
Android cursors read all the query results into memory, and have a limit of 1 MB for that data.
This limit was chosen because this amount of data is likely to make your app run sluggishly on a mobile device.
You should, if possible:
SELECT *
but get only the columns you need, and use a WHERE
filter);