Venice
Purch::SeekByStatCode
 
Seeks a Purchase Document by its statistics code.
 
VARIANT_BOOL SeekByStatCode (
    enum eSeekMode eSeekMode,
    BSTR bsStatCode
)
 
Key information
This method uses key number 7 (See SwapKey).
This key allows duplicates.
 
Key segment information
Segment NameTypeOrderCollation
pStatCodeBSTRAscendingCase insensitive
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsStatCode
[in] The statistics code of the Purchase Document you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreatePurch
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek all Purchase Documents with statistics code = 'STATS'
pPurch->SeekByStatCode (smEqual, "STATS");
while (pPurch->GetDBStatus () == 0 && (CString)pPurch->pStatCode == "STATS")
{
    // Process record data

    pPurch->GetNext ();
}

C#
 
// Seek all Purchase Documents with statistics code = 'STATS'
oPurch.SeekByStatCode (eSeekMode.smEqual, "STATS");
while (oPurch.GetDBStatus () == 0 && oPurch.pStatCode.ToString () == "STATS")
{
    // Process record data
    
    oPurch.GetNext ();
}

VBS
 
' Seek all Purchase Documents with statistics code = 'STATS'
Call oPurch.SeekByStatCode(smEqual, "STATS")
While oPurch.GetDBStatus() = 0 And oPurch.pStatCode = "STATS"
    ' Process record data

    Call oPurch.GetNext()
Wend

VB.NET
 
' Seek all Purchase Documents with statistics code = 'STATS'
oPurch.SeekByStatCode(eSeekMode.smEqual, "STATS")
While oPurch.GetDBStatus() = 0 And oPurch.pStatCode = "STATS"
    ' Process record data

    oPurch.GetNext()
End While