Android Sqlite database column defined in Create table script but not creating on table

前端 未结 2 452
长情又很酷
长情又很酷 2021-01-27 07:13

I have a the below table script:

\"CREATE TABLE \" + TABLE_XXX + \"(\"
                    + XXX_ID + \" INTEGER PRIMARY KEY,\"
                    + XXX_I         


        
2条回答
  •  臣服心动
    2021-01-27 07:41

    You need give some spaces on the code. Before the quotation marks.

    "CREATE TABLE " + TABLE_XXX + "("   
    + XXX_ID + " INTEGER PRIMARY KEY, "   
    + XXX_ITEM_NO + " TEXT, "     
    + XXX_DETAILS +" TEXT, "   
    + XXX_EXP_DATE + " TEXT, "   
    + XXX_IS_OK + " INTEGER, "
    + XXX_CODE + " TEXT "   
    + ")";  
    

提交回复
热议问题