<< Click to Display Table of Contents >> Navigation: Apollo API Listing > sx_SetExact |
Declare Sub sx_SetExact Lib "Apollo9.dll"
(ByVal uiOnOff As Integer)
VOID FAR PASCAL sx_SetExact
(USHORT uiOnOff);
Indicates whether or not Seeks are to return True if a partial key match is made.
uiOnOff: If True, key searches made with sx_Seek must match exactly in content and length. Partial key matches will result in False returns from sx_Seek.
If False, the exact condition is turned off.
The sx_SetExact setting is applied to all index seeks in the current task. It is global to the current task.
Note: If sx_SetSoftSeek is set to True, the sx_SetExact setting is disabled.
Sub ButtonSeek_Click ()
RecStr$ = InputBox$("Seek Key?", "Seek", "")
If RecStr$ = "" Then Exit Sub
sx_SetExact True ' key must match in content and length
If sx_Seek(UCase$(RecStr$)) Then
Call sx_GetRecord(lRec)
BoxCust.Text = lRec.lCust
Else
MsgBox "Key Not Found"
ButtonTop_Click
End If
sx_SetExact False
End Sub
sx_SetExact(TRUE); // key must match in content and length
if (sx_Seek(cpKey))
sx_GetRecord(cpRec);
else
AfxMessageBox((LPCSTR) "Key Not Found");
sx_SetExact(FALSE);