|
@@ -820,7 +820,15 @@ procedure TField.SetData(Buffer: Pointer; NativeFormat : Boolean);
|
|
begin
|
|
begin
|
|
If Not Assigned(FDataset) then
|
|
If Not Assigned(FDataset) then
|
|
DatabaseErrorFmt(SNoDataset,[FieldName]);
|
|
DatabaseErrorFmt(SNoDataset,[FieldName]);
|
|
|
|
+ if (FieldNo>0) and not (FDataSet.State in [dsSetKey, dsFilter]) then
|
|
|
|
+ begin
|
|
|
|
+ if ReadOnly then
|
|
|
|
+ DatabaseErrorFmt(SReadOnlyField, [DisplayName], Self);
|
|
|
|
+ Validate(Buffer);
|
|
|
|
+ end;
|
|
FDataSet.SetFieldData(Self,Buffer, NativeFormat);
|
|
FDataSet.SetFieldData(Self,Buffer, NativeFormat);
|
|
|
|
+ if not (FDataSet.State in [dsCalcFields, dsFilter, dsNewValue]) then
|
|
|
|
+ DataChanged;
|
|
end;
|
|
end;
|
|
|
|
|
|
Procedure TField.SetDataset (AValue : TDataset);
|
|
Procedure TField.SetDataset (AValue : TDataset);
|