Attempt to re-open an already-closed object: java.lang.IllegalStateException:?
I know this question has asked many times in SO,but i couldn't figure out my exact problem. I am using the following code to get the data from the database(Table1) and update another Table2 based on retrieval value. Its working fine in some android versions but when i gone to test with Android 4.0.3. I am geting this java.lang.IllegalStateException:?.attempt to re-open an already-closed object at sum_cursor.moveToNext(); . I am using this code in AsyncTask. /** Sum of total matched values*/ Cursor sum_cursor = db.gettotalMatchvalue(this); if(sum_cursor!=null) { sum_cursor.moveToFirst(); for