|
AnyDAC
|
Populates a string list with the names of key fields in a table.
|
Parameters |
Description |
|
const ACatalogName: string |
A catalog name. |
|
const ASchemaName: string |
A schema name. |
|
const ATableName: string |
A table name. |
|
const APattern: string |
A LIKE-pattern. |
|
AList: TStrings |
A list receiving primary key field names. |
Call GetKeyFieldNames to retrieve a list of primary key fields in a table.
ACatalogName, ASchemaName, ATableName names the table whose primary field names you want added to the list.
APattern is the LIKE-pattern filtering field names.
AList is a TStrings descendant that receives the primary key field names. Any existing strings are deleted from the list before GetKeyFieldNames adds the names of the primary key fields in ATableName.
The field names are normalized - enclosed into quotes, if that is required, otherwise converted to default dictionary case.
procedure GetKeyFieldNames(const ACatalogName: string; const ASchemaName: string; const ATableName: string; const APattern: string; AList: TStrings);
ADConnection1.GetKeyFieldNames('NORTHWIND', 'DBO', 'MYTAB', '', ListBox1.Items);See AnyDAC\Samples\Comp Layer\TADConnection\GetFieldNames sample.
|
What do you think about this topic? Send feedback!
|