lundi 20 juillet 2015

SQLite error Android - Index -1 requested

I am trying to get some data from my DB, but i get next error:

Index -1 requested, with a size of 1

here is my code:

sUri = DB_Contract.ChatListEntry.buildUriForCurrentRoom(sNewMessageRoomId);
        sCursor = sActivity.getContentResolver().query(sUri, sChatProjection, null, null, null);

        messageCount = sCursor.getInt(NEW_MESSAGE_COUNT) + 1;

I got this error when trying to get messageCount;

Please, any ideas how to fix this! Great thanks!

Aucun commentaire:

Enregistrer un commentaire