sx_Reindex

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_Reindex

VB Declaration

Declare Sub sx_Reindex Lib "Apollo9.dll" ()

C Declaration

VOID FAR PASCAL sx_Reindex (VOID);

Description

Rebuilds all active orders attached to the current work area. If reindexing a compound index, the DBF file must be opened for EXCLUSIVE use. The progress of the function may be visually monitored if a gauge hook has been set with sx_SetGaugeHook.

VB Example

Sub ButtonIndexMake_Click ()

If Not sx_Use("c:\vb\cust.dbf", "cust", EXCLUSIVE, SDENTX)

MsgBox "File not available. Try again later."

Else

iRet = sx_IndexOpen("c:\vb\sxcust1.ntx")

iRet = sx_IndexOpen("c:\vb\sxcust2.ntx")

iRet = sx_IndexOpen("c:\vb\sxcust3.ntx")

sx_SetGaugeHook GaugeBox.hWnd

GaugeTotal = 3

sx_Reindex

sx_SetGaugeHook 0

sx_Close

End If

End Sub

C Example

if (!sx_Use("c:\\vb\\cust.dbf", "cust", EXCLUSIVE, SDENTX))

AfxMessageBox((LPCSTR) "File in use. Try again later.");

else

{

sx_IndexOpen("c:\\vb\\sxcust1.ntx");

sx_IndexOpen("c:\\vb\\sxcust2.ntx");

sx_IndexOpen("c:\\vb\\sxcust3.ntx");

sx_Reindex();

sx_Close();

}

See Also

sx_Index, sx_IndexTag, sx_Pack, sx_SetGaugeHook