<< Click to Display Table of Contents >> Navigation: Apollo API Listing > sx_Reindex |
Declare Sub sx_Reindex Lib "Apollo9.dll" ()
VOID FAR PASCAL sx_Reindex (VOID);
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.
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
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();
}