ArtSrl::SeekByCode
 
Seeks a Serial Number card by its code.
 
VARIANT_BOOL SeekByCode (
    enum eSeekMode eSeekMode,
    BSTR bsCode,
    BSTR bsArtNum
)
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsCode
[in] The code of the serial number card you want to seek.
bsArtNum
[in] The article number of the serial number card you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
Remarks
This method seeks the file using the key 'ASR_COD' (key number 1).
 
See Also
CreateArtSrl
GetDBStatus
GetNext
The UNIT4 C-Logic Description File 'ArtSr.cld' in the Cld-directory in the system path of your Venice installation.
 
Samples
 
C++
 
// Seek the serial number card with code '00158069002'
CString    strCode = "00158069002";
pArtSrl->SeekByCode (smGreaterOrEqual, (LPCSTR)strCode, "");
if (pArtSrl->GetDBStatus () == 0 && (CString)pArtSrl->pCode == strCode)
{
    // Process data
}

C#
 
// Seek the serial number card with code '00158069002'
string strCode = "00158069002";
oArtSrl.SeekByCode (eSeekMode.smGreaterOrEqual, strCode, "");
if (oArtSrl.GetDBStatus () == 0 && oArtSrl.pCode.ToString () == strCode)
{
    // Process data
}

VBS
 
' Seek the serial number card with code '00158069002'
Dim strCode
strCode = "00158069002"
Call oArtSrl.SeekByCode(smGreaterOrEqual, strCode, "")
If oArtSrl.GetDBStatus() = 0 And oArtSrl.pCode = strCode Then
    ' Process record data
End If

VB.NET
 
' Seek the serial number card with code '00158069002'
Dim strCode As String
strCode = "00158069002"
oArtSrl.SeekByCode(eSeekMode.smGreaterOrEqual, strCode, "")
If oArtSrl.GetDBStatus() = 0 And oArtSrl.pCode = strCode Then
    ' Process record data
End If