<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods > TagName |
Declaration
function TagName( iTagArea: Integer ): String;
Description
Retrieves the name of the tag associated with the passed tag area number.
TagName may be used to enumerate the tag names contained within a compound index (see example below). It may also be used to determine whether or not a structural compound index was opened automatically with the table.
Parameters
iTagArea: A number identifying the Tag area for which you would like to extract the name. If zero is passed, the current Tag name is retrieved. If the number passed is greater than the number of Tags present in the CDX, a null string is returned (i.e., a string with zero length).
Return Value
An string identifying the name of the tag within the compound index (CDX or NSX) at the order specified by iTagArea.
Delphi Example
procedure Form1.Button1Click(Sender: TObject);
var
i: Integer;
begin
// Open file that uses structural .CDX
ApTbl.Open;
// Fill list box ListBox1 with index names
i := 1;
while Length( ApTbl.TagName( i )) > 0 do
begin
ListBox1.Items.Add( ApTbl.TagName( i ));
Inc( i );
end;
end;
See Also