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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:55:49+00:00 2026-05-27T12:55:49+00:00

i was write the method to delete row….but, i don’t know why, i can’t

  • 0

i was write the method to delete row….but, i don’t know why, i can’t delete row….
this is my the method…

public void clearDatabase() {
    openDataBase();
    try {
        int id=0;
        Cursor c = myDB.rawQuery("Select id from " + tablename +" asc", null);
        if (c.getCount() > 22) {
            c.moveToFirst();
            id = c.getInt(0);

            for(int i = 0;i<11;i++){
                int x = id+i;

                myDB.execSQL("delete from "+tablename +" where id = "+x , null);
            }

        }
        else 
        c.close();
        closedb();

    } catch (SQLiteException ex) {
        ex.printStackTrace();
    }

}

and this is the logcat:
12-13 12:10:57.073: ERROR/AndroidRuntime(327): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.parser/com.parser.parse}: java.lang.IllegalArgumentException: Empty bindArgs

Please help me!…Thanks before1

  • 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-05-27T12:55:50+00:00Added an answer on May 27, 2026 at 12:55 pm

    I use

    public void deleteEntry(long lRow) {
    
        ourDatabase.delete(DATABASE_TABLE, KEY_ROWID + "=" + lRow, null);
    }
    

    in my SQLite DB to delete a row, where lRow is passed from my view activity.

    EDIT

    and here is my delete button in the view activity

    String dRow = etSQLvRec.getText().toString();
            long lRow = Long.parseLong(dRow);
    
            DBase db1 = new DBase(this);
    
            try {
                db1.open();
                db1.deleteEntry(lRow);
                db1.close();
            } catch (Exception e) {
    
                String error = e.toString();
                Dialog d = new Dialog(this);
                d.setTitle("Cannot Delete");
                TextView tv = new TextView(this);
                tv.setText(error);
                d.setContentView(tv);
                d.show();
            }
    

    etSQLvRec is a TextView that displays the _id of the record I’m viewing, I pass it so it deletes the record I’m viewing.

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

Sidebar

Related Questions

I'm trying to write a method like this: public static T Test<T>() { if
for some reason I can't delete a row of my table, this is my
I have a problem please guide me :) I write this method : public
I'm wanting to write a method that I can use to initialise a Map.
public void LoadRealmlist() { try { File.Delete(Properties.Settings.Default.WoWFolderLocation + Data/realmlist.wtf); StreamWriter TheWriter = new StreamWriter(Properties.Settings.Default.WoWFolderLocation
I have this foreach (var columnName in columns) { writer.RenderBeginTag(HtmlTextWriterTag.A); writer.AddAttribute(href, null); writer.Write(Delete); writer.RenderEndTag();
I recently ran into this problem: Rails 3 link_to (:method => :delete) not working
I have an action method setup: public ActionResult Delete(IList<Product> products) And a table of
serial.write() method in pyserial seems to only send string data. I have arrays like
How do you write a method/message with multiple parameters? EDIT: Like multiple parameters for

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.