After debugging into the heart of the matter I found out that the error was caused by a primary key violation that raises the correct exception in
Code: Select all
procedure TDataSet.CheckRequiredFields;
var
I: Integer;
begin
for I := 0 to FFields.Count - 1 do
[b] if FFields[I].Required and not FFields[I].ReadOnly and (FFields[I].FieldKind = fkData) and FFields[I].IsNull then[/b]
begin
FFields[I].FocusControl;
DatabaseErrorFmt(SFieldRequired, [FFields[I].DisplayName]);
end;
end;