<< Click to Display Table of Contents >> Navigation: Apollo API Listing > sx_TagName |
Declare Function sx_TagName Lib "Apollo9.dll"
(ByVal iTagArea As Integer)
As String
LONG FAR PASCAL sx_TagName
(SHORT iTagArea);
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.
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).
An string identifying the name of the tag within the compound index (CDX or NSX) at the order specified by iTagArea.
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
// 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);