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