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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:32:22+00:00 2026-06-05T11:32:22+00:00

when i try to update a table the app crashing and return this fatal

  • 0

when i try to update a table the app crashing and return this fatal error:

06-09 08:02:34.026: I/Database(342): sqlite returned: error code = 1, msg = no such column: username
06-09 08:02:34.034: E/Database(342): Error updating valore=1234 using UPDATE parametri SET valore=? WHERE _parametro=username
06-09 08:02:34.034: D/AndroidRuntime(342): Shutting down VM
06-09 08:02:34.034: W/dalvikvm(342): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
06-09 08:02:34.054: E/AndroidRuntime(342): FATAL EXCEPTION: main
06-09 08:02:34.054: E/AndroidRuntime(342): android.database.sqlite.SQLiteException: no such column: username: , while compiling: UPDATE parametri SET valore=? WHERE _parametro=username

The function of insert/update is this:

    String strFilter = ParametriMetaData.PARAMETRO+"=" + parametro;
    ContentValues args = new ContentValues();
    args.put(ParametriMetaData.VALORE, valore);

    System.out.println( strFilter );

    mDb.update(ParametriMetaData.TAB_PARAMETRI, args, strFilter, null);

This is the definition of table:

private static final String CREA_TAB_PARAMETRI = "CREATE TABLE IF NOT EXISTS "  //codice sql di creazione della tabella
                    + ParametriMetaData.TAB_PARAMETRI + " ("
                    + ParametriMetaData.PARAMETRO+ " text primary key, "
                    + ParametriMetaData.VALORE + " text not null);";

Whatsup? Thank you!

  • 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-05T11:32:24+00:00Added an answer on June 5, 2026 at 11:32 am

    Update query must have proper where clause update(tablename, value, referenceField+"=?", value);

    String strFilter = ParametriMetaData.PARAMETRO+"=?";
        ContentValues args = new ContentValues();
        args.put(ParametriMetaData.VALORE, valore);
    
        System.out.println( strFilter );
    
        mDb.update(ParametriMetaData.TAB_PARAMETRI, args, strFilter, parametro);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to update database table and this is my code: public void updatefiletable(String
I have some code to update a database table that looks like try {
I try to update a table using another table. I get the error number
I try to update my profile image and use this code: $connection->post('account/update_profile_image', array('image' =>
I have this code for update: public Boolean update() { try { data.put(ContactsContract.Groups.SHOULD_SYNC, true);
Basically try to do the same as: UPDATE table SET column3 = column1 +
I try to update a column in an table with the following query. In
I try to realize a link (in fact many links) that update a table
i am creating an app that needs a database. i created it using sqlite
I'm writing an app for wp7 using coolstorage and sqlite as the database. The

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.