FireDAC.Comp.Client.TFDCustomManager.GetKeyFieldNames
Delphi
procedure GetKeyFieldNames(const AConnectionName, ACatalogName, ASchemaName,
ATableName, APattern: string; AList: TStrings);
C++
void __fastcall GetKeyFieldNames(const System::UnicodeString AConnectionName, const System::UnicodeString ACatalogName, const System::UnicodeString ASchemaName, const System::UnicodeString ATableName, const System::UnicodeString APattern, System::Classes::TStrings* AList);
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FireDAC.Comp.Client.pas FireDAC.Comp.Client.hpp |
FireDAC.Comp.Client | TFDCustomManager |
Description
Populates a string list with the names of key fields in a table.
Call GetKeyFieldNames to retrieve a list of primary key fields from a table.
AConnectionName
is the connection name to use.
ACatalogName, ASchemaName, ATableName
identifies the table whose primary field names you want to be added to the list.
APattern
is the LIKE-pattern for filtering field names.
AList
is a TStrings descendant that receives the primary key field names. Any existing strings are deleted from the list before GetKeyFieldName adds the names of the primary key fields in ATableName
.
The field names are normalized (enclosed in quotes), if required; otherwise, they are converted to default database dictionary case sensitive/insensitive.
Example
FDManager.GetKeyFieldNames('myconn', 'NORTHWIND', 'DBO', 'MYTAB', '', ListBox1.Items);