RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomDataSetAdapter.UpdateFieldsUpdateValues Method

Updates the adapter's fields with values passed in the HTTP request.

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

UpdateFieldsGetAnyChanges applies the updates in the current request message to the specified adapter fields. 

AActionRequest is an interface to the current request object. 

AAdapterFields is a list of fields to update. 

UpdateFieldsUpdateValues performs the following tasks: 

1.It generates an OnBeforeUpdateFields event.  

2.It calls LocateRequestRecord to position the associated dataset on the record identified by the parameters of the current request.  

3.It loops through the specified adapter fields, calling their UpdateValue method to update the value of the associated dataset field. If any of the adapter fields encounters a problem in its UpdateValue method, UpdateFieldsExecuteValues adds a message to the Errors property indicating what problem occurred before trying to check the next field in the list. 

4.If there were any errors updating field values, it cancels all edits to the current record, backing out the changes. Otherwise, it posts the current record to the dataset. 

 

  1. It generates an OnAfterUpdateFields event.

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!