I am working with sqlite. I have successfully created the database and table. I also wrote code that can insert new values ββinto my table. My code works fine, but now I want to show, for example: a toast message, if a new value is inserted, otherwise show an error message in the toast or something else. This is my insert in the source code of the table:
public void InsertToPhysicalPersonTable(String FirstName, String LastName, String FullName, String FatherName) { try { ContentValues newValues = new ContentValues(); newValues.put("FirstName", FirstName); newValues.put("LastName", LastName); newValues.put("FullName", FullName); newValues.put("FatherName", FatherName); db.insert(AddNewPhysicalPerson, null, newValues); } catch (Exception e) {
I called my function as follows:
loginDataBaseAdapter.InsertToPhysicalPersonTable("FirstName", "LastName", "FullName", "FatherName" );
If anyone knows a solution, please help me. Thanks
source share