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

前端 未结 2 438
长情又很酷
长情又很酷 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 "   
    + ")";  
    
    0 讨论(0)
  • 2021-01-27 07:44

    There are missing whitespaces in your statement.

    + XXX_IS_OK +"INTEGER, "
    

    should be:

    + XXX_IS_OK +" INTEGER, "
    
    0 讨论(0)
提交回复
热议问题