Hello everyone!
i'm trying to do with database in android.
here is my code
}
// where i show cursor
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
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;
{
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