Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8198657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:59:44+00:00 2026-06-07T05:59:44+00:00

I am new to android. I would like to create a database that will

  • 0

I am new to android. I would like to create a database that will contain a name and phone number. I need to add in this database or to modify the phone number element.
Can someone please help me with creating a table with this two elements in database and check if a specific name exists. If no I want to create add add it in the table. If the name exists I want to be able to modify the phoe number. I want to create the table just once. I think I also need to check if the table is created or no.

Can someone give me a full android example with instantiate, create, insert, delete or modify or search elements in a database? Please?

Appreciate,. Thank you

Based on the example with the student database (http://androidpartaker.wordpress.com/2011/07/03/introduction-to-android-sqlite-database)

I have:

if (cursor != null) {
            while (cursor.moveToNext()) {
                if (cursor.getString(1).equals("me")) value=i;
                Log.i("Student", "Student Name: " + cursor.getString(1)
                        + " Grade " + cursor.getString(2));

                i=i+1;
            }
        }

        Cursor cursor1 = dbUtil1.fetchStudent(value);
        if (cursor1 != null) {
            //while (cursor1.moveToNext())
            {

                Toast.makeText(this, "Student "+ "Student Name: " + cursor1.getString(1)
                        + " Grade " + cursor1.getString(2),Toast.LENGTH_LONG).show();

                //i=i+1;
            }
        }

but is not working properly. where am I wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:59:46+00:00Added an answer on June 7, 2026 at 5:59 am

    Here is a very good introduction to Android SQLite database via a sample application : http://androidpartaker.wordpress.com/2011/07/03/introduction-to-android-sqlite-database/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i would like to buy a new cell phone that runs Android. From what
I am new to android. I would like to create an array list that
I am new to android. I would like to monitor the sip packets that
I am a new to Android development and I would like to create an
I am new to programming on the Android and would like to create an
Hi i am new to android programming and i would like to know how
I would like some help about an Android Application. I used the new Google
I'm fairly new to Java and Android programming in general but I would like
In an given Android activity, I would like to start a new activity for
I would know if there is the possibility to create a new Android Activity

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.