public class RestaurantHelper extends SQLiteOpenHelper{
public static final String TABLE_RESTAURANTS = "table_restaurants";
public static final String COL_ID = "ID";
public static final String COL_NAME = "NAME";
public static final String COL_ADRESSE = "ADRESSE";
public static final String COL_GENRE = "GENRE";
public static final String COL_NOTES = "NOTES";
public static final String COL_TELEPHONE = "TELEPHONE";
private static final String CREATE_BDD = "CREATE TABLE" + TABLE_RESTAURANTS +
" (" + COL_ID + "INTEGER PRIMARY KEY AUTOINCREMENT," + COL_NAME + "TEXT NOT NULL," +
COL_ADRESSE + "TEXT NOT NULL," + COL_GENRE + "TEXT NOT NULL," + COL_NOTES + "TEXT NOT NULL," +
COL_TELEPHONE + "TEXT NOT NULL);";
public RestaurantHelper(Context context, String name,CursorFactory factory, int version) {
super(context, name, factory, version);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(CREATE_BDD);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE"+ TABLE_RESTAURANTS);
onCreate(db);
}
}
我是 android 新手,我收到此错误消息,但我不知道出了什么问题。谢谢。