我执行功能,遍历行光标这些行并尝试添加到数组中,获取语句的自定义错误 arr_date[i]=String.valueOf(str);
private String[] logCursor(Cursor c) {
// TODO Auto-generated method stub
final String Tag="States";
String[] arr_date = new String[] {};
if (c!=null) {
if (c.moveToFirst()) {
String str;
int i=-1;
do {
str="";
i=i+1;
for (String cn: c.getColumnNames()) {
str = str.concat(c.getString(c.getColumnIndex(cn)));
}
Log.d(Tag, str);
arr_date[i]=String.valueOf(str);
} while (c.moveToNext());
}
}
return arr_date;
}