RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomDataSetAdapter.UpdateFieldsGetAnyChanges Method

Indicates whether the values in the HTTP request change the value of any adapter fields.

Pascal
function UpdateFieldsGetAnyChanges(AActionRequest: IActionRequest; AAdapterFields: TObjectList): Boolean; override;
C++
virtual __fastcall Boolean UpdateFieldsGetAnyChanges(IActionRequest AActionRequest, TObjectList AAdapterFields);

UpdateFieldsGetAnyChanges checks the specified adapter fields to see if the current request message causes any of them to change their values. 

AActionRequest is an interface to the current request object. 

AAdapterFields is a list of fields to check to see whether the request changes their values. 

UpdateFieldsGetAnyChanges returns true if one or more field values changes as a result of the current request. 

UpdateFieldsGetAnyChanges always returns true if the mode of the adapter is amQuery or amInsert, because queries and insertions always start with no field values and so any field values in the request represent a change. 

If Mode is not amQuery or amInsert, UpdateFieldsGetAnyChanges first calls LocateRequestRecord to position the associated dataset on the record identified by the parameters of the current request. It then loops through the specified adapter fields, calling their CheckValueChange method to determine if they have changed. If the CheckValueChange method of any field returns true, UpdateFieldsGetAnyChanges returns true. 

If any of the adapter fields encounters a problem in its CheckValueChange method, UpdateFieldsExecuteValues adds a message to the Errors property indicating what problem occurred before trying to check the next field in the list. 

 

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