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

  • SEARCH
  • Home
  • 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 8560559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:18:11+00:00 2026-06-11T16:18:11+00:00

I have a dialog that has 3 buttons (OK, Alterar, Delete) so when i

  • 0

I have a dialog that has 3 buttons (OK, Alterar, Delete) so when i click in Alterar it goes to another activity to alter the values, but i dont know the code to alter it.
I only know 2, which are .put/.insert and .delete .
Now what about alter?

2 rows: nome , telefone

  • 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-11T16:18:12+00:00Added an answer on June 11, 2026 at 4:18 pm

    Allright, this is an answer to your edit.
    Let’s say your table containing your rows has the name Person.
    Now you want to change the phone number of the person “MrSmith” to 123456789.

    First, enter the new values you want to change.

    // Values to insert
    ContentValues dataToInsert = new ContentValues();                          
    dataToInsert.put("name", "MrSmith");
    dataToInsert.put("phone", 123456789);
    

    Maybe you dont need to put the name back in again, it was some time ago i did this. You can try out yourself 🙂
    Now lets insert these into the database!

    // We want to update the row where the name is "MrSmith"
    String where = "id=?";
    String[] whereArgs = { "MrSmith" };
    

    The ? in where string is replaced with MrSmith when we do db.update(…).
    Now SQL knows what row to update and what data it should update it with. Let’s commit!

    // Update table Person where the row name is "MrSmith"  with the values entered
    // in ContentValues!
    db.update("Person", dataToInsert, where, whereArgs);
    

    I hope this helps! Otherwise you need to check out how SQL Statements are done.

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

Sidebar

Related Questions

i have a dialog box and in it, it has two buttons, one that
I have a WPF form that has some buttons to save user input, delete,
I have a dialog that I show with <class>.ShowDialog() . It has an OK
I have a dialog that I want to place within another dialog and position
I have an app that has two buttons – one for email & one
I have a program with a screen that has about 50 buttons, it looks
I have an Activity that has all the display elements added dynamically. Theres no
I have one form that has several elements and two submit buttons, one is
I want to raise a jQuery Dialog box which has 2 buttons. So that
I have a method that displays and AlertDialog that has 3 Buttons ; neutral,

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.