RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBaseDataSetAdapterField.GetDataSetFieldValue Method

Returns the value of the associated dataset field.

Pascal
function GetDataSetFieldValue(Field: TField): Variant; virtual;
C++
virtual __fastcall Variant GetDataSetFieldValue(TField Field);

GetDataSetFieldValue returns the value of the associated dataset field, given a field object. This method is called by the implementation of the Value property when there is no OnGetValue event handler. 

Field is the dataset field whose value this adapter field represents. It is the component that the FindField method returns. 

In TBaseDataSetAdapterField, GetDataSetFieldValue returns the Value property of the Field parameter. Descendant classes can override this method to derive the field value from the dataset field in some other way. For example, TCustomDataSetAdapterImageField uses the display text, because the field component's Value property is a binary encoding of the image. Similarly, if you create a custom descendant for encrypted fields, GetDataSetFieldValue could decrypt the value that is stored in the database table. 

 

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