RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomDataSetAdapter.UpdateFieldsValidateValues Method

Validates the values passed in the current HTTP request for the adapter's fields.

Pascal
procedure UpdateFieldsValidateValues(AActionRequest: IActionRequest; AAdapterFields: TObjectList); override;
C++
virtual __fastcall UpdateFieldsValidateValues(IActionRequest AActionRequest, TObjectList AAdapterFields);

UpdateFieldsValidateChanges screens the field values in the current request message to determine whether they appear valid. 

AActionRequest is an interface to the current request object. 

AAdapterFields is a list of fields to check. 

UpdateFieldsUpdateValues performs the following tasks: 

1.If the adapter is in edit mode or browse mode, it calls LocateRequestRecord to position the associated dataset on the record identified by the parameters of the current request and then loops through the specified adapter fields, calling their CheckOrigValue method to ensure that the field values on the specified record have not been changed by another user.  

2.If any of the original field values have changed, UpdateFieldsUpdateValues adds a message to the Errors property and returns. 

3.It generates an OnBeforeValidateFields event.  

4.It loops through the specified adapter fields, calling their ValidateValue method to validate the new value from the request message. If any of the adapter fields raises an exception its UpdateValue method (indicating an invalid value), UpdateFieldsValidateValues adds a message to the Errors property before trying to validate the next field value. 

 

  1. It generates an OnAfterValidateFields event.

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!