sx_Eof

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_Eof

VB Declaration

Declare Function sx_Eof Lib "Apollo9.dll" () As Integer

C Declaration

BOOL FAR PASCAL sx_Eof (VOID);

Description

Tests if a record movement function has placed the record pointer beyond the last record in the file (EOF - end of file).

Return Value

True if end of file has been encountered and False if not. If sx_Eof returns True, the record buffer is empty and the current record number is equal to the number of records in the file plus one.

VB Example

Sub ButtonNext_Click ()

sx_Skip (1)

If sx_Eof() Then

Beep

MsgBox "End of file!"

sx_GoBottom

End If

 

Call sx_GetRecord(lRec)

BoxCust.Text = lRec.lCust

BoxName.Text = lRec.lName

End Sub

C Example

void CNamesForm::OnButtonNext()

{

sx_Skip(1);

if (sx_Eof())

{

AfxMessageBox((LPCSTR) "End of file.");

sx_GoBottom();

}

}

See Also

sx_Append, sx_Bof, sx_GoBottom, sx_Skip