I have a working application with a sql lite database just short of 170 records. I only have select statements no CRUD just the select statements. When i select from my list view and the record number is greater than 125 "Selection >= Record 125" it crashes with the Unable to convert BLOB to string however for the first 124 records all of them work perfectly here is my code snippet below any assistance would be appreciated. I have consulted all the other questions however all of them relate to inserts and updates as where my app works up until a certain record Number in my database
My code,
String[] details = new String[9];
Human hmn = null;
List<Human> humanList = new ArrayList<>();
openDatabase();
Cursor cursor = myDatabase.rawQuery("SELECT * FROM Human WHERE Human.IdentNr = " + Number,null);
if (cursor != null ) {
if (cursor.moveToFirst()) {
details[0] = String.valueOf(cursor.getInt(cursor.getColumnIndex("Nr")));
details[1] = String.valueOf(cursor.getInt(cursor.getColumnIndex("IdentNr")));
details[2] = cursor.getString(cursor.getColumnIndex("Name"));
details[3] = cursor.getString(cursor.getColumnIndex("Type"));
details[4]= cursor.getString(cursor.getColumnIndex("WalkDist"));
details[5] =String.valueOf(cursor.getInt(cursor.getColumnIndex("Food")));
details[6] = cursor.getString(cursor.getColumnIndex("Relationship"));
details[7] = cursor.getString(cursor.getColumnIndex("Status"));
details[8] = cursor.getString(cursor.getColumnIndex("ImageName"));
}
cursor.close();
}
closeDatabase();
The above snippet is from a method that accepts Number as a int and returns details array