You can get the specific reason if instead of insert()
you use insertOrThrow()
and catch the exception, then the error message should help you figure out the reason quickly.
totramon
2010-08-20 10:39:56
You can get the specific reason if instead of insert()
you use insertOrThrow()
and catch the exception, then the error message should help you figure out the reason quickly.
As I can see so far, your ContentValues keys are not the same as the column names, which should be as I recall.
So your constants would have to become;
private static final String KEY_EMPLOYEE_ID = "Employee_ID";
private static final String KEY_EMPLOYEE_NAME = "Employee_Name";
private static final String KEY_EMPLOYEE_DESIGNATION = "Designation";
private static final String KEY_EMPLOYEE_MARITUALSTATUS = "Maritual_Status";
private static final String KEY_EMPLOYEE_DOJ = "JoinedDateTime";
if that doesn't solve your problem, try to post the stacktrace, so that we have more details to help you.