mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 15:29:25 +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
|
||||
If Not Assigned(FDataset) then
|
||||
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);
|
||||
if not (FDataSet.State in [dsCalcFields, dsFilter, dsNewValue]) then
|
||||
DataChanged;
|
||||
end;
|
||||
|
||||
Procedure TField.SetDataset (AValue : TDataset);
|
||||
|
Loading…
Reference in New Issue
Block a user