sx_Deleted

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_Deleted

VB Declaration

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

C Declaration

BOOL FAR PASCAL sx_Deleted (VOID);

Description

Determines whether or not the current record has been logically deleted.

 

If sx_SetDeleted is True, deleted records are invisible to all record positioning functions except for sx_Go. If you want to test deleted status for a range of records using sx_Skip to traverse the range, ensure that you set sx_SetDeleted False.

Return Value

True if the record has been logically deleted, and False if not. Records may be recalled (the logical deletion flag is reset) with sx_Recall.

VB Example

Sub ButtonDelete_Click ()

If sx_Deleted() Then

ButtonDelete.Caption = "Delete"

sx_Recall

DeleStat.Value = -sx_Deleted()

Else

ButtonDelete.Caption = "Recall"

sx_Delete

DeleStat.Value = -sx_Deleted()

End If

End Sub

C Example

void CNamesForm::OnButtonDelete()

{

if (sx_Deleted())

{

if (AfxMessageBox((LPCSTR) "Already deleted. Recall?",

MB_YESNO) == IDYES)

sx_Recall();

}

else

{

if (AfxMessageBox((LPCSTR) "Confirm delete.", MB_YESNO) == IDYES)

sx_Delete();

}

 

// gotop and refresh the browse

m_sdebrowse->SetNumProperty("Action", BRW_ACT_GOTOP);

m_sdebrowse->SetFocus();

}

See Also

sx_Delete, sx_Pack, sx_Recall, sx_SetDeleted, sx_Zap