while retrieving data from sqlite getting below exception.
11-19 11:37:43.357: E/AndroidRuntime(1494): java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.
query is -
 Cursor c= db.rawQuery("SELECT * FROM "+OpenHelper.TABLE_ACTIVITY_DETAIL+" WHERE "+OpenHelper.Activity_Date+" = '"+date+"'",null);
    if(c != null){
        if (c.moveToFirst()){
            do{
                task=c.getString(c.getColumnIndex("task"));
                activityList.add(""+task); 
            }while(c.moveToNext());
        }
    }
    c.close();  
    db.close();
is there any solution?
 
    