-1
如何通過光標在文本框中顯示檢索到的數據通過遊標檢索數據。它提供了一個錯誤 「光標移出的束縛......」如何顯示在文本框
Cursor c=mydb.rawquery("select * from customer where phone='"+editphone.getText().tostring+" ",null);
editname.settext(c.getString(0));
android
如何通過光標在文本框中顯示檢索到的數據通過遊標檢索數據。它提供了一個錯誤 「光標移出的束縛......」如何顯示在文本框
Cursor c=mydb.rawquery("select * from customer where phone='"+editphone.getText().tostring+" ",null);
editname.settext(c.getString(0));
只要使用,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-10 11:09:42