数据库不会创建第5列

时间:2018-04-16 13:49:05

标签: java database sqlite

我'我的数据库出了问题。我创建的这个表只适用于第4列;当我尝试使用新插入的列codice运行应用程序时,我发现此错误:

E/SQLiteLog: (1) table Cuccioli has no column named Codice

E / SQLiteDatabase:插入Nome时出错= Ff Codice = Namjje Sesso = Maschio Razza = Volpino                   android.database.sqlite.SQLiteException:table Cuccioli没有名为Codice的列(代码1):,编译时:INSERT INTO Cuccioli(Nome,Codice,Sesso,Razza)VALUES(?,?,?,?)

这是创作表代码

public static final String CREATE_TABLE =
        "CREATE TABLE " + TABLE_NAME + "("
                + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT,"
                + COLUMN_NOME + " TEXT,"
                + COLUMN_RAZZA + " TEXT,"
                + COLUMN_SESSO + " TEXT,"
                + COLUMN_CODICE + " TEXT"
                + ")";

0 个答案:

没有答案