PayWork::SeekByGroupCode (Interface: PayWork)
 
Seeks a Payment card in the work file by its group code.
 
VARIANT_BOOL SeekByGroupCode (
    enum eSeekMode eSeekMode,
    BSTR bsGroupCode,
    DATE dExpDate
)
 
Key information
This method uses key number 4 (See SwapKey).
This key allows duplicates.
 
Key segment information
Segment NameTypeOrderCollation
pGroupCodeBSTRAscendingCase insensitive
pExpDateDATE (date)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsGroupCode
[in] The group code of the payment you want to seek.
dExpDate
[in] The expiration date of the payment you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreatePayWork
 
Samples
 
C++
 
// Seek all payments in the working file for the group with code 'Group' and an expiration date greater than or equal to 28/08/2024
COleDateTime odtExpDate;
odtExpDate.SetDate (2024, 8, 28);
pPayWork->SeekByGroupCode (smGreaterOrEqual, "Group", odtExpDate);
while (pPayWork->GetDBStatus () == 0 && (CString)pPayWork->pGroupCode == "Group" && (DATE)pPayWork->pExpDate >= odtExpDate)
{
    // Process record data
    
    pPayWork->GetNext ();
}

C#
 
// Seek all payments in the working file for the group with code 'Group' and an expiration date greater than or equal to 28/08/2024
DateTime dtExpDate = new DateTime (2024, 8, 28);
oPayWork.SeekByGroupCode (eSeekMode.smGreaterOrEqual, "Group", dtExpDate);
while (oPayWork.GetDBStatus () == 0 && oPayWork.pGroupCode.ToString () == "Group" && (DateTime)oPayWork.pExpDate >= dtExpDate)
{
    // Process record data
    
    oPayWork.GetNext ();
}

VBS
 
' Seek all payments in the working file for the group with code 'Group' and an expiration date greater than or equal to 28/08/2024
Dim dtExpDate
dtExpDate = #8/28/2024#
Call oPayWork.SeekByGroupCode(smGreaterOrEqual, "Group", dtExpDate)
While oPayWork.GetDBStatus() = 0 And oPayWork.pGroupCode = "Group" And oPayWork.pExpDate >= dtExpDate
    ' Process record data

    Call oPayWork.GetNext()
Wend

VB.NET
 
' Seek all payments in the working file for the group with code 'Group' and an expiration date greater than or equal to 28/08/2024
Dim dtExpDate As Date
dtExpDate = #8/28/2024#
oPayWork.SeekByGroupCode(eSeekMode.smGreaterOrEqual, "Group", dtExpDate)
While oPayWork.GetDBStatus() = 0 And oPayWork.pGroupCode = "Group" And oPayWork.pExpDate >= dtExpDate
    ' Process record data

    oPayWork.GetNext()
End While