sx_SetTurboRead

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_SetTurboRead

VB Declaration

Declare Sub sx_SetTurboRead Lib "Apollo9.dll"

(ByVal uiOnOff As Integer)

C Declaration

VOID FAR PASCAL sx_SetTurboRead(USHORT uiOnOrOff);

Description

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.

Parameters

See description above.

VB Example

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

C Example

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

}