jeudi 1 janvier 2015

android - inserting long into SQLite Integer field

I am working on an app and need some help. I have a table where I store some informations and another which has a reference. The column where the reference is made is named "COLUMN_MODULE_ID". In my DBHelper, I have declared it as an Integer. But the value I get (which is the ID from the other inserted table row which I get as a long type) seems to not get into the table.


If I put i.e. 600 hard coded into the column "COLUMN_MODULE_ID", everything works fine. But if I set the long value "module_id" hard coded to 600 and put the variable into the column, it doesn't work.


Any suggestions?


Aucun commentaire:

Enregistrer un commentaire