• 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
Jan 22, 2010
3
0
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
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones