• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Help with cursor!!!

kitty

Lurker
Hello everyone!
i'm trying to do with database in android.
here is my code

public​
Cursor getName()
{

Cursor mCursor =
db.query(true, DATABASE_TABLE, new String[] {
KEY_ROWID,KEY_NAME},
null,
null,
null,
null,
null,
null);
return mCursor;

}

// where i show cursor
TextView id = (TextView) view.findViewById(android.R.id.​
text1);

id.setText(cursor.getString(0));

if i just select only KEY_NAME like this (

new String[] {KEY_NAME})my application doesnt work, its ok if i have enough KEY_ROWID,KEY_NAME .

Anyone has problem like me please help
thanks in advance
 
Back
Top Bottom