<< Click to Display Table of Contents >> Navigation: Apollo API Listing > sx_Deleted |
Declare Function sx_Deleted Lib "Apollo9.dll" () As Integer
BOOL FAR PASCAL sx_Deleted (VOID);
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.
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.
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
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();
}