Closed chekwon78 closed 7 years ago
uninstall the app and install it again
This happen to me and I didn't space out the data types in dbhelper class example. " TEXT NOT NULL, "
i uninstalled my app and re installed it but the problem remains same column has no table error while compiling INSERT INTO ....
Had the same issue, here is my solution. Clear the cache, and run the app again.
The code, as is, runs fine on my emulator. However, when I click 'Insert Dummy Data' it fails to insert the data in the database. The following is the error I get on my logcat:
3-23 16:32:25.059 5771-5771/com.example.android.pets E/SQLiteDatabase: Error inserting name=Toto gender=1 weight=7 breed=Terrier android.database.sqlite.SQLiteException: table pets has no column named gender (code 1): , while compiling: INSERT INTO pets(name,gender,weight,breed) VALUES (?,?,?,?)
Any help would be greatly appreciated