2012-12-28 62 views
0

我在表格视图中填充数据库colums和diaplying。我得到CursorIndexOutOfBoundsErrorandroid.database.CursorIndexOutOfBoundsException:请求的索引14,大小为14

这里是我的代码:

while(rows.isValidRow()) 
{ 

date=rows.fieldByName('Date'); 

displaydate(date); 

Ti.API.info(';'+date); 

while(date==rows.fieldByName('Date')) 
{ 


    intime=rows.fieldByName('StartTime'); 
    outtime=rows.fieldByName('EndTime'); 
    taskname=rows.fieldByName('TaskName'); 
    note=rows.fieldByName('Note'); 


    displayreport(intime,outtime,'',taskname,note); 

    Ti.API.info(';'+intime+';'+outtime+';'+taskname+';'+note); 

    rows.next();   

} 
     rows.next(); 

}  


rows.close(); 

回答

0

你有你的样品中太多rows.next();。重温你如何构建你的循环。

相关问题