ArtLoc::SeekByPriority (Interface: ArtLoc)
 
Seeks an Article Location card by its priority.
 
VARIANT_BOOL SeekByPriority (
    enum eSeekMode eSeekMode,
    BSTR bsWarehouse,
    BSTR bsArtNum,
    BYTE byPriority
)
 
Key information
This method uses key number 3 (See SwapKey).
This key allows duplicates.
 
Key segment information
Segment NameTypeOrderCollation
pWarehouseBSTRAscendingCase insensitive
pArtNumBSTRAscendingHierarchy
pPriorityBYTEAscending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsWarehouse
[in] The warehouse of the article location card you want to seek.
bsArtNum
[in] The article number of the article location card you want to seek.
byPriority
[in] The priority of the article location card you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateArtLoc
GetDBStatus
 
Samples
 
C++
 
// Seek the article location with the highest priority for the article with number 'Art_001' in warehouse 'Wrh_01'
CString    strWarehouse = "Wrh_1", strArtNum = "Art_001";
pArtLoc->SeekByPriority (smGreaterOrEqual, (LPCSTR)strWarehouse, (LPCSTR)strArtNum, 1);
if (pArtLoc->GetDBStatus () == 0 && (CString)pArtLoc->pWarehouse == strWarehouse && (CString)pArtLoc->pArtNum == strArtNum)
{
    // Process data
}

C#
 
// Seek the article location with the highest priority for the article with number 'Art_001' in warehouse 'Wrh_01'
string strWarehouse = "Wrh_1", strArtNum = "Art_001";
oArtLoc.SeekByPriority (eSeekMode.smGreaterOrEqual, strWarehouse, strArtNum, 1);
if (oArtLoc.GetDBStatus () == 0 && oArtLoc.pWarehouse.ToString () == strWarehouse && oArtLoc.pArtNum.ToString () == strArtNum)
{
    // Process data
}

VBS
 
' Seek the article location with the highest priority for the article with number 'Art_001' in warehouse 'Wrh_01'
Dim strWarehouse, strArtNum
strWarehouse = "Wrh_1"
strArtNum = "Art_001"
Call oArtLoc.SeekByPriority(smGreaterOrEqual, strWarehouse, strArtNum, 1)
If oArtLoc.GetDBStatus() = 0 And oArtLoc.pWarehouse = strWarehouse And oArtLoc.pArtNum = strArtNum Then
    ' Process data
End If

VB.NET
 
' Seek the article location with the highest priority for the article with number 'Art_001' in warehouse 'Wrh_01'
Dim strWarehouse, strArtNum As String
strWarehouse = "Wrh_1"
strArtNum = "Art_001"
oArtLoc.SeekByPriority(eSeekMode.smGreaterOrEqual, strWarehouse, strArtNum, 1)
If oArtLoc.GetDBStatus() = 0 And oArtLoc.pWarehouse = strWarehouse And oArtLoc.pArtNum = strArtNum Then
    ' Process data
End If