Venice
Sales::SeekByStatCode
 
Seeks a Sales 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 Sales Document you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateSales
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek all Sales Documents with statistics code = 'STATS'
pSales->SeekByStatCode (smEqual, "STATS");
while (pSales->GetDBStatus () == 0 && (CString)pSales->pStatCode == "STATS")
{
    // Process record data

    pSales->GetNext ();
}

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

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

    Call oSales.GetNext()
Wend

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

    oSales.GetNext()
End While