FireDAC.Comp.DataSet.TFDDataSet.UpdateConstraints
Delphi
procedure UpdateConstraints;
C++
void __fastcall UpdateConstraints();
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
procedure function |
public | FireDAC.Comp.DataSet.pas FireDAC.Comp.DataSet.hpp |
FireDAC.Comp.DataSet | TFDDataSet |
説明
クライアント制約に加えられた変更を適用して、それらを更新します。
UpdateConstraints メソッドを使用すると、データセットがアクティブになってから制約に加えられた変更を適用して、それらを更新できます。
Open 呼び出しが行われると、Constraints プロパティに格納されているクライアント制約(レコード制約)か、データセット フィールドに割り当てられているクライアント制約(フィールド制約)が自動的に更新されます。アクティブ データセットの制約の変更は自動的には反映されません。
例
with FDQuery1.FieldByName('age') do begin
CustomConstraint := 'age >= 18';
ConstraintErrorMessage := 'The age must be greater than or equal to 18 years';
end;
FDQuery1.UpdateConstraints;