RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomSQLDataSet.GetKeyFieldNames Method

Fills a list with the names of all fields in all indexes defined for the dataset.

Pascal
function GetKeyFieldNames(List: TWideStrings): Integer; overload;
C++
__fastcall int GetKeyFieldNames(TWideStrings List);

Call GetKeyFieldNames to fill a string list with information about the indexes that are available on the database server for this dataset. 

For every index defined on the server for the dataset, GetKeyFieldNames adds a string to the string list specified by List. Each string is a semicolon-delimited set of field names that lists the fields in a single index. 

TCustomSQLDataSet does not explicitly use these indexes. GetKeyFieldNames can be useful for composing SQL commands dynamically that need to use an index to access fields. 

 

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