sx_GoBottom

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_GoBottom

VB Declaration

Declare Sub sx_GoBottom Lib "Apollo9.dll" ()

C Declaration

VOID FAR PASCAL sx_GoBottom (VOID);

Description

Moves the record pointer to the last record in the file.

If an order is active, this is the last logical record in the file. If there is no order active, this is the last physical record in the file.

A forward skip from this position will have sx_Eof return True and the record buffer will be emptied.

If sx_SetDeleted is True, and/or a filter is set with sx_SetFilter or sx_Query, or a scope has been set, the record pointer will be positioned to the last record in the file that satisfies the imposed conditions.

VB Example

' use sx_GoBottom to force end of file

sx_GoBottom

sx_Skip 1

MsgBox "End of file has been set"

C Example

void CNamesForm::OnButtonAdd()

{

LONG lSaveRec;

 

// re-enable database linkage

m_date->SetNumProperty("Unlink", FALSE);

 

// set switch on, setup append, and then edit

bAddMode = TRUE;

lSaveRec = sx_RecNo();

sx_GoBottom();

sx_Skip(1L);

OnButtonEdit();

// if user cancels edit, bAddMode will be FALSE

if (bAddMode)

sx_Append();

else

sx_Go(lSaveRec);

}

See Also

sx_Eof, sx_Go, sx_GoTop, sx_Query, sx_Skip, sx_SetDeleted, sx_SetFilter