I'm doing a project on Android and creating a b.d SQLite and in the class that extends SQLiteOpenHelper
at the time of doing an insert I'm getting the following:
table stops has not column lng
But the table has the column. For syntax errors in the variable where the query is to create the table I missed 2 commas in the last 2 fields (lat and lng)
For the first one I solved it with the same method that I have been trying to solve the second: deleting data from the app on the mobile, uninstalling the mobile app and increasing the version number of bd but at this time It is not resulting. I do not know what else I should do to stay with the fields at the time of debugging or running the app.
Just in case I leave the variables of how is the sentence that creates the table:
// Table Names
private static final String TABLA_PARADAS = "paradas";
// Columnas tabla paradas
private static final String PARADAS_CODIGO = "cod";
private static final String PARADAS_LAT = "lat";
private static final String PARADAS_LNG = "lng";
// Columnas comunes
private static final String ID = "_id";
private static final String NOMBRE = "nombre";
private static final String DESC = "desc";
// Table Create Statements
// Create statement tabla paradas
private static final String CREATE_TABLE_PARADAS = "CREATE TABLE "
+ TABLA_PARADAS + " (" + ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + PARADAS_CODIGO + " TEXT,"
+ NOMBRE + " TEXT, " + DESC + " TEXT, " + PARADAS_LAT
+ " DOUBLE, " + PARADAS_LNG + "DOUBLE)";