开发者

SQLiteException table depot has no column named ... , while compiling INSERT INTO

开发者 https://www.devze.com 2023-03-22 15:57 出处:网络
I get following error message in my little android application: SQLiteException: table depot has no column named price_per_unit: , while compiling INSERT INTO depot(...)

I get following error message in my little android application:

SQLiteException: table depot has no column named price_per_unit: , while compiling INSERT INTO depot(...)

But hell, how can this happen? I am using a Metadata-class for providing all names:

My create table is this one:

db.execSQL("CREATE TABLE " + DepotTableMetaData.TABLE_NAME + " (" 
                + DepotTableMetaData._ID + " INTEGER PRIMARY KEY,"
                + DepotTableMetaData.ITEM_QRCODE + " INTEGER,"
                + DepotTableMetaData.ITEM_NAME + " TEXT,"
                + DepotTableMetaData.ITEM_AMOUNT + " DOUBLE,"
                + DepotTableMetaData.ITEM_UNIT + " TEXT,"
                + DepotTableMetaData.ITEM_PPU + " DOUBLE,"
                + DepotTableMetaData.ITEM_TOTAL + " DOUBLE,"
                + DepotTableMetaData.ITEM_COMMENT + " TEXT,"
                + DepotTableMetaData.CREATED_DATE + " INTEGER,"
                + DepotTableMetaData.MODIFIED_DATE + " INTEGER"
               开发者_C百科 + ");");

while my DepotTableMetaData.ITEM_PPU exactly means the price_per_unit and I never call again this price_per_unit, I only refer to it as DepotTableMetaData_ITEM_PPU. What can this be?


The variable 'DepotTableMetaData.ITEM_PPU' is probably set to 'price_per_unit'.

0

精彩评论

暂无评论...
验证码 换一张
取 消