When I try to get data from SQlite and size of field more than 2 MB it throw exception
"Couldn't read row 0, col 0 from Cursor Window. Make sure the Cursor is initialized correctly before accessing data from it.
"
How can I store a field that have above 2 Mb get into string ?
i store multiple Base64 Strings as LONG TEXT in sqlite it store successfully but when i fatch from database that goes into exception because of that field contain above 2400000 characters.
this is the code
public ArrayList<HashMap<String, String>> selectRecordFromDbList(String qry, String[] args, boolean status) {
ArrayList<HashMap<String, String>> arraylist = null;
try {
HashMap<String, String> mapRow;
Cursor cursor = sqLiteDatabase.rawQuery(qry, args);
if (cursor.moveToFirst()) {
arraylist = new ArrayList<>();
do {
mapRow = new HashMap<>();
for (int i = 0; i < cursor.getColumnCount(); i++) {
mapRow.put(cursor.getColumnName(i), cursor.getString(i));
}
arraylist.add(mapRow);
} while (cursor.moveToNext());
}
if (cursor != null && cursor.isClosed()) {
cursor.close();
}
} catch (Exception e) {
Log.e("SqliteAssetHelper:", e.getMessage());
arraylist = null;
}
return arraylist;
}