Sqliteexception No Such Table:itemtable While Compiling: Select_id,.... From Itemtable
I've been getting this errors in my logcat for a while now. I tried a lot of things like clearing the data in my app, un-installing and re-installing my app, upgrading my DB versio
Solution 1:
You have a syntax problem in your create table
. Date/Time
is not a valid column name - get rid of the /
.
The syntax problem is hidden because of the try
-catch
in SQLiteOpenHelper
onCreate()
. If there is a problem, onCreate()
must throw an exception. Otherwise SQLiteOpenHelper
thinks everything is ok.
After fixing the two problems above, either uninstall your app/clear its data or bump up the database version so that onCreate()
gets called again.
Solution 2:
Format of your create table statement is not correct.
Special symbols are not allowed in table column name
So remove "/" from Date/Time in your table column name.
it will solve the problem.
The actual problem is table is not created due to this issue and unable to throw exception because of try catch block.
Post a Comment for "Sqliteexception No Such Table:itemtable While Compiling: Select_id,.... From Itemtable"