Android : code 1 SQLITE_ERROR (No Colum_name was Found)

前端 未结 1 2021
时光说笑
时光说笑 2020-12-21 15:23

i am Learning Database Storage in Android for that i am trying to create a Simple App With Names of vegetables and Friuts and Flowers for that

i designed a database l

相关标签:
1条回答
  • 2020-12-21 15:55

    If you have defined the constants for column names, then you should use them. Here you are passing them as a string and that's why you are getting an error while inserting data into the table.

    In your createlist method use below

    cv.put(COLUMN_TITLE, title);
    cv.put(COLUMN_IMAGE, image);
    

    instead of what you are using:

    cv.put("COLUMN_TITLE", title);
    cv.put("COLUMN_IMAGE", image);
    
    0 讨论(0)
提交回复
热议问题