You are obviously either trying to enter a value into
LVE_ID
that is already in the database (duplicate value) or you are trying to enter a value into this field where the field is meant to be auto generated. I will also mention that you should be using parameterised values instead of concatenating strings to produce your sql query. This will, first of all prevent you from entering values of the wrong type for the field as well as prevent you from suffering an sql injection attack. Here is a sample of what I mean by parameterised query
INSERT into ATT_LVE (LVE_ID,LVE_EMP_ID,LVE_TYP_ID,LVE_BGNAT,LVE_ENDAT,LVE_REASON,LVE_BGN,LVE_END,LVE_STATUS,LVE_APPLIEDON)Values (@LVE_ID,@LVE_EMP_ID,@LVE_TYP_ID,@LVE_BGNAT,@LVE_ENDAT,@LVE_REASON,@LVE_BGN,@LVE_END,@LVE_STATUS,@LVE_APPLIEDON)
cmd.Parameters.AddWithValue("@LVE_ID", txtLeaveID.Text);
cmd.Parameters.AddWithValue("@LVE_EMP_ID", txtEmpID.Text);
cmd.Parameters.AddWithValue("@LVE_TYP_ID", ddlLeaveType.Text);
etc
Hope this helps