protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.predmet_zapis); dbHelper = new DBHelper(this); ed1 = (EditText) findViewById(R.id.et_predmet); bt1 = (Button) findViewById(R.id.but1); bt1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { bd = dbHelper.getWritableDatabase(); ContentValues cv = new ContentValues(); String chisl1 = ed1.getText().toString(); cv.put("chisl", chisl1); long rowID = bd.insert("mypoints", null, cv); Log.d("LOG_TAG", "row inserted, ID = " + rowID); dbHelper.close(); } }); } public class DBHelper extends SQLiteOpenHelper { public DBHelper(Context context) { // конструктор суперкласса super(context, "myDB", null, 1); } @Override public void onCreate(SQLiteDatabase db) { // создаем таблицу с полями Log.d("123","cоздана БД"); db.execSQL("create table mypoints (" + "id integer primary key autoincrement," + "chisl text"+");"); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { } } I try to create a DB, but does not form. Writes "no such table: mypoints".
I deleted the application from the phone, reinstalled it - it worked, but after I decided to change the table name, it stopped working with the same error, why is that?