Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Java
public void addInfo()
    {
        // add the new data to the db

        helper.getWritableDatabase();
        ContentValues cv = new ContentValues();
        cv.put(ed1.getText().toString(), category);
        cv.put(ed2.getText().toString(),shape);
        cv.put(ed3.getText().toString(),prise);
        db.insert(helper.TABLE_PRODUCT,null,cv);
        Toast.makeText(getApplicationContext(),"Data Successfully Entered",Toast.LENGTH_LONG).show();
        db.close();
    }
Posted
Updated 14-May-15 23:40pm
v2
Comments
ZurdoDev 15-May-15 8:19am    
1. If you found the error then what is your question?
2. There is no way we can help because we can't see the code. We don't know what db is and we can't see it's insert method.
Richard MacCutchan 15-May-15 9:19am    
What is the error?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900