Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to remove an error in sqlite that says sqlite returned: error code = 1, msg = no such table: DetailsCustomer,
    text
    copied!<p>I'm using an DBAdapter to insert into a Database but it giving me an error when i exec. please help me here is my code below : </p> <p>public class DBAdapter {</p> <pre><code> public static final String COLUMN_ID = "ID"; public static final String COLUMN_NAME = "NAME"; public static final String COLUMN_SURNAME = "SURNAME"; public static final String COLUMN_DATE_OF_BIRTH = "DateOfBirth"; public static final String COLUMN_ADDRESS = "HomeAddress"; public static final String COLUMN_EMAIL = "EmailNO"; public static final String COLUMN_PHONE_NUMBER = "PhoneNumber"; public static final String COLUMN_CITY = "City"; public static final String COLUMN_PTYE_PAYMENT = "TypePayment"; public static final String COLUMN_SHIPPING_TYPE = "ShippingType"; public static final String COLUMN_CARD_NUMBER = "CardNumber"; public static final String COLUMN_Password = "Passwords"; public static final String TAG = "DBAdapter"; static final String DATABASE_NAME = "SuperComputers.db"; static final String USERS_TABLE = "DetailsCustomer"; static final int DATABASE_VERSION = 3; private final Context context; private DatabaseHelper DBHelper; private SQLiteDatabase db; public DBAdapter (Context ctx) { this.context=ctx; DBHelper = new DatabaseHelper(context); } private static class DatabaseHelper extends SQLiteOpenHelper { DatabaseHelper(Context context) { super (context,DATABASE_NAME,null,DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { try { //db.execSQL(DATABASE_CREATE); db.execSQL("CREATE TABLE "+ USERS_TABLE + "("+ COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + COLUMN_NAME + " TEXT, " + COLUMN_SURNAME +" TEXT, " +COLUMN_DATE_OF_BIRTH+ " TEXT NOT NULL, " + COLUMN_ADDRESS + " TEXT, " + COLUMN_EMAIL + " TEXT, " + COLUMN_PHONE_NUMBER + " TEXT, " + COLUMN_CITY + " TEXT, " + COLUMN_PTYE_PAYMENT + " TEXT, " + COLUMN_CARD_NUMBER + " TEXT, " + COLUMN_Password +" TEXT)"); } </code></pre> <p>catch (SQLException e) { e.printStackTrace();</p> <pre><code> } } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion , int newVesion) { Log.w(TAG, "Upgrading database from version " + oldVersion + "to" + newVesion + ", which will destroy all old data"); db.execSQL("DROP TABLE IF EXISTS USERS_TABLE "); onCreate(db); } } </code></pre> <p>I need to insert information into a database but i cant because of an error</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload