Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table pets has no column named weight #14

Closed
shaurya96 opened this issue May 25, 2017 · 11 comments
Closed

table pets has no column named weight #14

shaurya96 opened this issue May 25, 2017 · 11 comments

Comments

@shaurya96
Copy link

shaurya96 commented May 25, 2017

Error inserting name=Toto gender=1 weight=7 breed=Terrier
android.database.sqlite.SQLiteException: table pets has no column named weight (code 1): , while compiling: INSERT INTO pets(name,gender,weight,breed) VALUES (?,?,?,?)

@vcctu85
Copy link

vcctu85 commented Jul 4, 2017

Hi @shaurya96 , double check your syntax and the order of your arguments. Or if you can specify exactly where in the code you're getting this error, I'd be happy to look at it for you.

@ChandoraAnkit
Copy link

clear your app data and cache and try again..

@AlShaymaa1
Copy link

uninstall the app and install it again

@akwa-peter
Copy link

Am having same issue, have same issue and have cleared my data, uninstalled and installed back, but stilll having same issue

@M-Kalita
Copy link

@akwa-peter and @shaurya96

UNINSTALL THE APP AND TRY AGAIN! SAME ERROR SHOWED IN MINE APP TOO BUT AFTER REINSTALLING IT,it worked fine.

@jamin-hu
Copy link

Uninstalling the app and reinstalling it solved the same issue for me!

@essopsp
Copy link

essopsp commented Sep 2, 2018

Solution

String query = "CREATE TABLE "+TABLE_RejectList+"("+ COLUMN_NUMBER+"TEXT PRIMARY KEY);";

You forgot the space between COLUMN_NUMBER and "TEXT", it should be:

String query = "CREATE TABLE "+TABLE_RejectList+"("+ COLUMN_NUMBER+" TEXT PRIMARY KEY);";

@RubinTry
Copy link

@akwa-peter This is a amazing situation!It's may a bug on Android

@KurModi
Copy link

KurModi commented Apr 11, 2019

@essopsp You are right

@surajmaity1
Copy link

Solution

String query = "CREATE TABLE "+TABLE_RejectList+"("+ COLUMN_NUMBER+"TEXT PRIMARY KEY);";

You forgot the space between COLUMN_NUMBER and "TEXT", it should be:

String query = "CREATE TABLE "+TABLE_RejectList+"("+ COLUMN_NUMBER+" TEXT PRIMARY KEY);";

It worked for me..
Thanks a lot

@AsogwaTech
Copy link

Clearing the cache and deleting the app data storage. Then uninstalled the app, it works!

@SudKul SudKul closed this as completed Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests