<< Click to Display Table of Contents >> Navigation: Apollo API Listing > sx_SetTurboRead |
Declare Sub sx_SetTurboRead Lib "Apollo9.dll"
(ByVal uiOnOff As Integer)
VOID FAR PASCAL sx_SetTurboRead(USHORT uiOnOrOff);
sx_SetTurboRead is used to speed up record i/o functions (specifically sx_Skip and sx_Seek). If you are going to be going into a lengthy record read or seek loop, lock the file and then sx_SetTurboRead True. The default value is False.
See description above.
If sx_Flock() Then
sx_SetTurboRead True
sx_GoTop
nTotal = 0
Do while not sx_Eof()
nTotal = nTotal + sx_GetDouble("tvalue")
sx_Skip 1
Loop
sx_SetTurboRead False
End If
//Quickly process all the records
if (sx_Flock())
{
sx_SetTurboRead(TRUE);
sx_GoTop();
while(!sx_Eof())
{
sx_Replace((BYTEP)"LAST", R_CHAR, (BYTEP)"XXX");
sx_Skip(1);
}
sx_SetTurboRead(FALSE);
}