Go Back   Android Forums > Android Discussion > Android Developers

Android Developers Dev Lounge for the Coder Folks



Reply
 
LinkBack Thread Tools
Old 02-09-2010, 12:57 AM   #1 (permalink)
Hello, my name is .......
 
Join Date: Jan 2010
Posts: 3
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with cursor!!!

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

kitty is offline  
Reply With Quote
Sponsors
test
Reply

Bookmarks


Go Back   Android Forums > Android Discussion > Android Developers
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:30 PM.
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
Custom vBulletin Skins by: Relivo