sx_CloseIndexes

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_CloseIndexes

VB Declaration

Declare Sub sx_CloseIndexes Lib "Apollo9.dll" ()

C Declaration

VOID FAR PASCAL sx_CloseIndexes (VOID);

Description

Closes all open index files attached to the current work area.

VB Example

' 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

C C Example

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();

}

See Also

sx_IndexClose, sx_Close, sx_CloseAll