getColumnName
(int columnIndex)
Cursor的循环:
参考: http://www.cnblogs.com/TerryBlog/archive/2010/07/05/1771459.html
从给定的索引返回列名
然后,通过getXXX(列名)来获取数据,XXX表示数据类型:
int nameColumnIndex = cur.getColumnIndex(People.NAME);
String name = cur.getString(nameColumnIndex);
Cursor的循环:
if (cur.moveToFirst() == false)
{
//为空的Cursor
return;
}
参考: http://www.cnblogs.com/TerryBlog/archive/2010/07/05/1771459.html