mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 11:30:31 +02:00
* Added OnValidate event support (17510)
git-svn-id: trunk@17220 -
This commit is contained in:
parent
28ce3b96f0
commit
e8cf8e4177
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user