RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomDataSetAdapter.GetKeyParams Method

Retrieves a list of fields that the dataset adapter uses to locate records, along with their current values.

Pascal
procedure GetKeyParams(AParams: TLocateParamsList; ARecurse: Boolean);
C++
__fastcall GetKeyParams(TLocateParamsList AParams, Boolean ARecurse);

GetKeyParams fills out a TLocateParamsList object with the current values of all fields that the adapter uses to uniquely identify records. These name/value pairs are then added as hidden fields to HTML forms. When the adapter receives requests from forms containing those hidden parameters, it assigns them to the LocateParamsList property. 

Params is a collection of TLocateParams objects, where each TLocateParams object lists the key fields and their values for a single dataset adapter. 

ARecurse indicates whether GetKeyParams should return values for just this adapter, or to include values from all adapters linked to this one in a master/detail relationship as well. 

If ARecurse is false, GetKeyParams calls the GetKeyParamStrings method to obtain the key fields and their values for this dataset. It then adds these name/value pairs to Params. If ARecurse is true, GetKeyParams calls the GetKeyParams method (with ARecurse set to false) for this adapter and for every adapter linked to it in a master/detail relationship. 

 

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