sx_IndexName

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_IndexName

VB Declaration

Declare Function sx_IndexName Lib "Apollo9.dll"

(ByVal iIndex As Integer)

As String

C Declaration

LONG FAR PASCAL sx_IndexName (SHORT iIndex);

Description

Extracts the DOS file name and path of the defined index.

Parameters

iIndex: An integer identifying the order that will have its file name extracted. This function may be used to enumerate the indexes attached to the current work area.

The current order number may be retrieved with sx_IndexOrd.

Return Value

The file name is returned as a string.

VB Example

' close and kill index if its a conditional index

If sx_IndexType() = INDEX_CONDITIONAL Then

IndexName$ = sx_IndexName(sx_IndexOrd())

sx_IndexClose

Kill IndexName$

End If

iRet = sx_SetOrder(MasterIndex)

C Example

// close and kill IDX index if its a conditional index

if (sx_IndexType() == INDEX_CONDITIONAL)

{

lstrcpy((LPSTR) caIndex, (LPSTR) sx_IndexName(sx_IndexOrd()));

sx_IndexClose();

unlink(caIndex);

}

sx_SetOrder(sx_TagArea("last"));

See Also

sx_IndexKey, sx_IndexOrd, sx_IndexType, sx_TagArea, sx_TagName