Handling Key Violation and Required Field database errors

Is it possible to capture key violation and required field errors using
a single error handling routine. I have tried without success. Below is
what I have done so far. Is there a better way?

In my code below "Product Code" is the primary key and also a required
field. When I attempt to handle the required field error (#9732) in the
PostError event, nothing happens. But if I put the add code (in the
Button click event) in an exception block, it captures the error. What I
have done below also works but it looks a bit clumsy. I would much
rather handle all database errors in a single routine.

Also, if I have several required fields, can I determine for which
fields values have not been supplied via an error object?

Any help would be greatly appreciated. Thanks.

procedure TProdAddForm.AddBtnClick(Sender: TObject);
begin
  if (ProductCodeEd.Text <> '') then
  begin
    ProductTable.Append;
    ProductTable.FieldByName ('Product Code').AsString :=
ProductCodeEd.Text;
    // ... etc
    ProductTable.Post;
  end
  else
  begin
    MessageDlg ('The Product Code is blank.'#13#13'Please provide a
Product Code.', mtInformation, [mbOK], 0);
    ActiveControl := ProductCodeEd;
  end;
end;

procedure TProdAddForm.ProductTablePostError(DataSet: TDataSet;
  E: EDatabaseError; var Action: TDataAction);
var
  DBIError: integer;
begin
  if E is EDBEngineError then
  begin
    DBIError := (E as EDBEngineError).Errors[0].Errorcode;
    case DBIError of
      9729: // key violation
        begin
          MessageDlg ('The Product Code is already used.'#13#13'Please
provide a unique Product Code.',
            mtInformation, [mbOK], 0);
          Abort;
        end;
    end;
  end;
end;