sx_TagName

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_TagName

VB Declaration

Declare Function sx_TagName Lib "Apollo9.dll"

(ByVal iTagArea As Integer)

As String

C Declaration

LONG FAR PASCAL sx_TagName

(SHORT iTagArea);

Description

Retrieves the name of the tag associated with the passed tag area number.

 

sx_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.

VB Example

Sub Form_Load ()

Dim i As Integer

 

' open file that uses structural cdx

iRet = sx_Use("c:\vb\names.dbf", "names", READWRITE, SDEFOX)

 

' Fill list box List1 with index names

i = 1

Do While Len(sx_TagName(i)) > 0

List1.AddItem sx_Tagname(i), (i - 1)

i = i + 1

Loop

End Sub

C Example

// open database

sx_Use((BYTEP) "names.dbf", (BYTEP) "names", READWRITE, SDEFOX);

 

// if structural opened, enable ORDER button

if (lstrlen((LPSTR) sx_TagName(1)))

m_order.EnableWindow(TRUE);

else

m_order.EnableWindow(FALSE);

See Also

sx_IndexOrd, sx_IndexTag, sx_SetOrder, sx_TagArea