Data.SqlExpr.TCustomSQLDataSet.GetKeyFieldNames
| [–] Properties | |
|---|---|
| Type: function | |
| Visibility: public | |
| Source: Data.SqlExpr.pas Data.SqlExpr.hpp
| |
| Unit: Data.SqlExpr | |
| Parent: TCustomSQLDataSet | |
Delphi
function GetKeyFieldNames(List: TStrings): Integer;
C++
int __fastcall GetKeyFieldNames(System::Classes::TStrings* List);
Description
Fills a list with the names of all fields in all indexes defined for the dataset.
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.