-1

如何通过文本框中的光标显示检索到的数据..它给出错误“光标超出范围......”

Cursor c=mydb.rawquery("select * from customer where phone='"+editphone.getText().tostring+" ",null);

editname.settext(c.getString(0));
4

1 回答 1

2

刚用, c.moveToFirst()之前c.getString(0);

Cursor c=mydb.rawquery("select * from customer where phone='"+editphone.getText().tostring+" ",null);
if (c.moveToFirst()){
 editname.settext(c.getString(0));
}
于 2013-04-10T10:54:55.470 回答