with Fielddo
begin
if not (State in dsWriteModes) then
DatabaseError(SNotEditing, Self);
GetActiveRecBuf(RecBuf);
if FieldNo > 0 then
begin
if ReadOnly and not (State in [dsSetKey, dsFilter]) then
DatabaseErrorFmt(SFieldReadOnly, [DisplayName]);
Validate(Buffer);
if FModifiedFields.IndexOf(Field) = -1 then
FModifiedFields.Add(Field);
end;
if Buffer = nil then
Data := Null else
BufferToVar(Data);
PVariantList(RecBuf+SizeOf(TRecInfo))[Field.Index] := Data;
if not (State in [dsCalcFields, dsInternalCalc, dsFilter, dsNewValue]) then
DataEvent(deFieldChange, Longint(Field));
end;
end;