Android Application Development Tutorial – 122 – Getting a Specific Entry

Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –






20 responses to “Android Application Development Tutorial – 122 – Getting a Specific Entry”

  1. FourAGE Avatar

    For the most part.

  2. UTKARSH BHARDWAJ 11BCE0005 Avatar

    i am getting an error as no such Column  : "here whatever i have entered in the row id" how to solve this error

  3. Jarek Magulski Avatar

    If you keep getting one row after typing various row ID's check if your line:
    …..KEY_ROWID + "=" + l, null……
    contains the lowercased letter L after "=" +, instead of what I had at first, which was the number '1'

    hope this helped

  4. Hesham A. Adel Avatar

    when i try a certain row ID it gets its data, but the next time with any ID it gets nothing and keep the last data !!
    did any one face this problem ?

  5. Nawziii Avatar

    same here! -.-

  6. Kashif Butt Avatar

    Also, if row id is unique and if the cursor finds that row, that will be the only row retrieved hence no need to move to first row. Am I missing something?

  7. jeffrey brooks Avatar

    haha Samantha 7 … nice

  8. GRV Avatar

    still didn't got why are u using c.moveToFirst(); before reading the entry. Will that not set the cursor again to the first row…???

  9. OnyxShield92 Avatar

    How would someone do this with a web page. display information more smooth like this rather than in webview

  10. Mikhail Berezovskiy Avatar

    In that case the simplest way is to do like this:
    if (c.moveToFirst()) {
    hotness = c.getString(c.getColumnIndex(KEY_HOTNESS));

    moveToFirst() – return false if there is no any data.

    And we also need to close cursor.

  11. Ankit Srivastava Avatar

    how to merge this thing with the internet??

  12. Shawnecy Avatar

    Alternatively, you can also use:
    if (cursor != null && cursor.moveToFirst())

  13. wis0g Avatar

    Cursor c = ourDataBase.query(DATABASE_TABLE, KEY_NAME, null, null, null, null,
    that way we don't need to create the String Array, almost the same but in my cel with 30Mb of ram every byte counts

  14. JORGE LUNA Avatar

    excelente Tutorial jeje

  15. Hamiska Avatar

    @hamisym poor me,
    at KEY_ROWID + "=" + id in getname() and gethotness() methods
    I used "-" instead of "=". Time to bed now :))

  16. Hamiska Avatar

    mine always returns the 1st row in database, still don't know how to fix >-(

  17. stri8ted Avatar

    You can prevent the error when imputing a nonexistent row, by switch the if c!=null to if (c!= null && c.getCount()>0)

  18. JustNoName Avatar

    I fucking got the idea! I did GetDataById and used bundle! 🙂

  19. ArnoldRoxx Avatar

    awesome !!! (expressionmark) 😉

  20. super0chick Avatar

    Travis, how would you program a selection not according to the I'd but a touch to the row

Leave a Reply

Your email address will not be published. Required fields are marked *