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 8992587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:59:24+00:00 2026-06-15T22:59:24+00:00

Hello I’m making a budget application that will allow you to look at expeances

  • 0

Hello I’m making a budget application that will allow you to look at expeances entered and if need be delete them I can call the method run thro it and it wont have a issue but when I check to see if it worked it hasnt I’ve tried but cant figure out why this doesn’t work. I use a alert dialog to confirm that they want to delete.

AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
                    this);

                // set title
                alertDialogBuilder.setTitle("DELETE "+position);

                // set dialog message
                alertDialogBuilder
                    .setMessage("Are you sure you whant to delete Expeance "+position)
                    .setCancelable(false)

                    .setPositiveButton("yes", new DialogInterface.OnClickListener() {

                        public void onClick(DialogInterface dialog, int which) {
                            // TODO Auto-generated method stub
                            String[]    po = position.split(" ");
                            String  date = po[0];
                            date = date +".tar.gz";
                            entry.open();
                            entry.deleteByDate(date);
                            entry.close();
                        recreate();
                        }

                    })
                    .setNegativeButton("No",new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog,int id) {
                            // if this button is clicked, just close
                            // the dialog box and do nothing
                            dialog.cancel();
                        }
                    });

                    // create alert dialog
                    AlertDialog alertDialog = alertDialogBuilder.create();

                    // show it
                    alertDialog.show();

and here is the code for the method

public SQLiteDatabase deleteByDate(String date2) 
        {
            // TODO Auto-generated method stub

            ourDatabase.delete(DATABASE_TABLE2, KEY_DATE + " =?", new String[] { date2 });
            ourDatabase.delete(DATABASE_TABLE4, KEY_DATE + " =?", new String[] { date2 });
            return ourDatabase;

        }
  • 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-15T22:59:26+00:00Added an answer on June 15, 2026 at 10:59 pm

    use Pattern.compile for replacing “/” with “-“ as instead of date.replace("/", "_"):

        Pattern p = Pattern.compile("/");
        String  date = po[0];
        Matcher matcher = p.matcher(date);
        date = matcher.replaceAll("_");
    
        date = date +".tar.gz";
        //your code here....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have trying to get around making my first C# application(that can do more
Hello guys I'm making an application that accesses MySQL & MsSQL databases that fiddles
Hello i am Making an application To login To Nexon.net , I cant Get
Hello I am having a hard time making this UI element look the way
Hello Android programmers, I am making a currency application and to do this, I
I am making a controller that will be responsible for a bunch of actions
Hello making a small program that reads a text file then creates an ouput
Hello i am making an small application in which i want search functionality i
I was making this hello world application using Struts2 and I've encountered an HTTP
hello I am very beginer of haskell I am making GUI program that open

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.