Artcl::SeekByStcNum (Interface: Artcl)
 
Seeks an Article card by its stock article.
 
VARIANT_BOOL SeekByStcNum (
    enum eSeekMode eSeekMode,
    BSTR bsStockNumber,
    BSTR bsNumber
)
 
Key information
This method uses key number 18 (See SwapKey).
This is a unique key.
This is a null key, only the records where pStockNumber is not blank are in the index.
 
Key segment information
Segment NameTypeOrderCollation
pStockNumberBSTRAscendingHierarchy
pNumberBSTRAscendingHierarchy
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsStockNumber
[in] The stock number of the Article you want to seek.
bsNumber
[in] The number of the Article you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateArtcl
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek all articles of which the stock is kept by article with number = "Stock_Parent"
CString strStcNum = "Stock_Parent";
pArtcl->SeekByStcNum (smGreaterOrEqual, (LPCSTR)strStcNum, "");
while (pArtcl->GetDBStatus () == 0 && (CString)pArtcl->pStockNumber == strStcNum)
{
    // Process record data
    
    pArtcl->GetNext ();
}

C#
 
// Seek all articles of which the stock is kept by article with number = "Stock_Parent"
string strStcNum = "Stock_Parent";
oArtcl.SeekByStcNum (eSeekMode.smGreaterOrEqual, strStcNum, "");
while (oArtcl.GetDBStatus () == 0 && oArtcl.pStockNumber.ToString () == strStcNum)
{
    // Process record data
    
    oArtcl.GetNext ();
}

VBS
 
' Seek all articles of which the stock is kept by article with number = "Stock_Parent"
Dim strStcNum
strStcNum = "Stock_Parent"
Call oArtcl.SeekByStcNum(smGreaterOrEqual, strStcNum, "")
While oArtcl.GetDBStatus() = 0 And oArtcl.pStockNumber = strStcNum
    ' Process record data
    
    Call oArtcl.GetNext()
Wend

VB.NET
 
' Seek all articles of which the stock is kept by article with number = "Stock_Parent"
Dim strStcNum As String
strStcNum = "Stock_Parent"
oArtcl.SeekByStcNum(eSeekMode.smGreaterOrEqual, strStcNum, "")
While oArtcl.GetDBStatus() = 0 And oArtcl.pStockNumber = strStcNum
    ' Process record data
    
    oArtcl.GetNext()
End While