<< Click to Display Table of Contents >> Navigation: Apollo API Listing > sx_CloseIndexes |
Declare Sub sx_CloseIndexes Lib "Apollo9.dll" ()
VOID FAR PASCAL sx_CloseIndexes (VOID);
Closes all open index files attached to the current work area.
' close indexes before appending from a large file
' this will speed up the operation and we can reindex later
sx_CloseIndexes
sx_SetGaugeHook GaugeBox.hWnd
GaugeFiles = 1 ' global to set gauge proportion
If sx_AppendFrom("c:\vb\sxqueue.dbf", SDENTX, 0&) Then
MsgBox "appended file successfully"
Else
MsgBox "appendfrom failed"
Exit Sub
End If
Log1Ntx = sx_IndexOpen("C:\vb\sxlog1.ntx")
Log2Ntx = sx_IndexOpen("C:\vb\sxlog2.ntx")
GaugeFiles = 2
sx_Reindex
sx_SetGaugeHook 0
sx_CloseIndexes();
if (!sx_AppendFrom("c:\\vb\\sxqueue.dbf", SDENTX, NULL))
{
AfxMessageBox((LPCSTR) "Batch append failed.");
return;
}
else
{
sx_IndexOpen("C:\\vb\\sxlog1.ntx");
sx_IndexOpen("C:\\vb\\sxlog2.ntx");
sx_Reindex();
}