RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomDataSetAdapterImageField.CheckOrUpdateValue Method

Checks whether a specified request contains a valid value and, if requested, uses that value to update the database.

Pascal
function CheckOrUpdateValue(AActionRequest: IActionRequest; AFieldIndex: Integer; AUpdate: Boolean): Boolean;
C++
__fastcall Boolean CheckOrUpdateValue(IActionRequest AActionRequest, int AFieldIndex, Boolean AUpdate);

CheckOrUpdateValue is called internally by the implementation of both the UpdateValue and the CheckValueChange methods to check for a properly-formed image value from an incoming request message. If requested, it also updates the corresponding database field. If the request object does not contain an appropriate value (for example, multiple values or a value that is not in .bmp format), CheckOrUpdateValue raises an EAdapterFieldException exception. 

AActionRequest is the interface of the action request object. CheckOrUpdateValue uses this interface to obtain the value from the incoming request to check or write to the database field. 

AFieldIndex is the index of this field in the set of field values that AActionRequest maintains. 

AUpdate indicates whether CheckOrUpdateValue should update the corresponding database field. If AUpdate is true, CheckOrUpdateValue assigns the properly validated value that it finds in AActionRequest to the associated database field. If AUpdate is false, CheckOrUpdateValue merely checks for the existence of an appropriate value. 

CheckOrUpdateValue returns true if this is not an update request and the request contains a reference to an appropriate image file. 

 

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