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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:43:19+00:00 2026-05-25T02:43:19+00:00

I used to insert 2 values/columns in my sqlite db(coordinates/markers to show them on

  • 0

I used to insert 2 values/columns in my sqlite db(coordinates/markers to show them on map), today i wanted to add another column, i added it as usual but when wanting to launch map activity i have a logcat error as:

08-23 13:27:30.001: ERROR/Database(300): android.database.sqlite.SQLiteException: no such table: coord: , while compiling: INSERT INTO coord(longitude, latitude, description) VALUES(?, ?, ?);

To create the db+table i’m using this code:

public class MaBaseSQLite extends SQLiteOpenHelper {

private static final String TABLE_COORD = "coord";
private static final String COL_ID = "ID";
private static final String COL_LATI = "latitude";
private static final String COL_LONGI = "longitude";
private static final String COL_DESCRI = "description";
private static final String DATABASE_NAME = "coord.db";
private static final int DATABASE_VERSION = 1;
private static final String CREATE_BDD = "CREATE TABLE " + TABLE_COORD + " ("
+ COL_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + COL_LATI + " TEXT NOT NULL, "
+ COL_LONGI + " TEXT NOT NULL, " + COL_DESCRI + "TEXT NOT NULL);";

MaBaseSQLite(Context context) {
    super(context, DATABASE_NAME, null, DATABASE_VERSION);
}

@Override
public void onCreate(SQLiteDatabase db) {
    //on créé la table à partir de la requête écrite dans la variable CREATE_BDD
    db.execSQL(CREATE_BDD);
}

To insert values i’m using this code in other class:

public long insertCoordo(Coordo coordo){
        //Création d'un ContentValues (fonctionne comme une HashMap)
        ContentValues values = new ContentValues();

        values.put(COL_LATI, coordo.getlati());
        values.put(COL_LONGI, coordo.getlongi());
        values.put(COL_DESCRI, coordo.getdescri());
        //on insère l'objet dans la BDD via le ContentValues
        return bdd.insert(TABLE_COORD, null, values);
    }

Example adding:

Coordo coordo = new Coordo(36.876673,10.325928, "TOTAL La Marsa");
CoordBd.insertCoordo(coordo);

And coordinates has 3 values as mentionned in this code in coordo() class:

public Coordo(Double lati, Double longi,String descri){
        this.lati = lati;
        this.longi = longi;
        this.descri= descri;
    }

What could be the problem with that?Why it can’t insert values on the table cause it dodn’t find it?
Thanks for helping.

  • 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-25T02:43:19+00:00Added an answer on May 25, 2026 at 2:43 am

    Adding a column in SQLite is not just changing the SQL command to create it. You have to either ALTER it or DROP it and CREATE it again in your onUpgrade.

    Then, you may have problems if you store doubles in TEXT. REAL is more adapted.

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

Sidebar

Related Questions

I have used automation to insert values into a cell, however I have never
we have problem with slow insert statement using 40 bind variables as columns values.
I am using sqlite database. I used the following code to store three values
I have a form which is used to insert/display and update . In the
In mysql, how do I get the primary key used for an insert operation,
How can you insert the date in the filename (a dynamic filename) used in
a) SqlCommand.ExecuteNonQuery is used for update, insert and delete operations. Besides the fact that
I am running this sort of query: insert into mytable (id, col1, col2) values
The standard approach for using variable values in SQLite queries is the question mark
I have a table with some 30 columns, already used in the application extensively.

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.