So i got an app that as an internal database, and the app crashes with this error :
04-30 20:46:30.836 1647-1647/prosis.guiatour E/SQLiteLog﹕ (1) no such column: Basílica_Santa_Luzia
and the code that this is refering to is :
public void onCreate(SQLiteDatabase db) {
db.execSQL(CREATE_QUERRY);
Log.e("Database Operations"," Table Created....");
db.execSQL(addingInfo("Basílica_Santa_Luzia", "Stuff", "10.43597", "-10.5747"));
Log.e("Database Operations"," Data Inserted");
}
public String addingInfo(String nome, String cat, String lat, String longi){
String Querry = "INSERT INTO "+ Table_name+" VALUES("+nome+","+cat+","+lat+","+longi+");";
return Querry;
}
And this is my contructer querry :
private static final String CREATE_QUERRY = "CREATE TABLE "+ Contract.NewLocalInfo.Table_name+" ("+ Contract.NewLocalInfo.Nome+" TEXT,"+ Contract.NewLocalInfo.Categoria+" TEXT,"+ Contract.NewLocalInfo.Latitude+" TEXT,"+ Contract.NewLocalInfo.Longitude+" TEXT);";
Aucun commentaire:
Enregistrer un commentaire