RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSQLConnection.GetIndexNames Method (WideString, TWideStrings)

Populates a string list with the names of indexes on a table.

Pascal
procedure GetIndexNames(const TableName: WideString; List: TWideStrings); overload;
procedure GetIndexNames(const TableName: WideString; const SchemaName: WideString; List: TWideStrings); overload;
C++
__fastcall GetIndexNames(const BSTR TableName, TWideStrings List);
__fastcall GetIndexNames(const BSTR TableName, const BSTR SchemaName, TWideStrings List);

Call GetIndexNames to retrieve a list of the indexes defined for a table.  

List is a TStrings descendant that receives the index names. Any existing strings are deleted from the list before GetIndexNames adds the names of all the indexes on TableName. 

TableName names the table whose indexes you want added to the list. 

For example, the following line fills a list box with the names of all indexes on the Employee table:

SQLConnection1.GetIndexNames('Employee', ListBox1.Items);

 

SQLConnection1->GetIndexNames("Employee", ListBox1->Items);

 

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