0

I'm having a problem with a ContentValues ​​that insert data into a db, then my situation is that I have to enter the pairs of values ​​that are being debugged, before insertion into the database, but then it just gives me I enter into the database, here is the code and then some screenshots.

public boolean insertElement(Element element) {
    long ret = manager.db.insert(this.getTableName(element), null,
            this.getContentValues(element, true));
    if (ret == -1)
        return false;
    element.id = ret;
    return true;
}

getTableName is my method to return the name of the table and that has always worked.

The problem is that I enter all the values ​​belonging to the value named "tipo", which is not included despite both within the content values.

This are some screenShot:

http://imageshack.us/photo/my-images/209/vyf.jpg/ After Insert

http://imageshack.us/photo/my-images/854/z2ua.png/ Element-ContentValues

Thanks

4

1 回答 1

1

As per I can see the problem lies in your getContentValues Method . Can you give some detail about this method and you table structure as it will help me to find out the problem.

Thanks.

于 2013-08-20T11:26:03.583 回答