Could not read row 0, col 0 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it

0

I'm doing the following query on android using OrmLite:

List<Mensagem> msgs = SqliteOrm.getMensagemDao(this).queryForAll();

however I'm getting the error below:

Couldn't read row 0, col 0 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.

Has anyone ever been through this?

    
asked by anonymous 03.03.2017 / 14:39

1 answer

0

The error says make sure your cursor class is properly initialized before accessing the data ...

You are probably trying to initialize the row / column of the cursor, except that the cursor has no row / column. I recommend looking at the return value of your cursor and checking if the return value is returning to a possible value

how can it be otherwise would be good for either logCat or the rest of the code to help, because sometimes the same error can occur because of data overflow, or the lack of them

    
03.03.2017 / 20:41