Venice
AnUnt::SeekByKindUnitAcc
 
Seeks an Analytical Unit entry by its kind, unit and account.
 
VARIANT_BOOL SeekByKindUnitAcc (
    enum eSeekMode eSeekMode,
    BSTR bsKind,
    BSTR bsUnit,
    BSTR bsAccNum,
    DATE dBookDate
)
 
Key information
This method uses key number 2 (See SwapKey).
This key allows duplicates.
 
Key segment information
Segment NameTypeOrderCollation
pAnaKindBSTRAscendingHierarchy
pAnaAccountBSTRAscendingHierarchy
pAccountBSTRAscendingCase sensitive
pBookDateDATE (date)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsKind
[in] The analytical kind of the analytical entry you want to seek.
bsUnit
[in] The analytical unit of the analytical entry you want to seek.
bsAccNum
[in] The general account of the analytical entry you want to seek.
dBookDate
[in] The book date of the document of which you want to seek an analytical entry.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateAnUnt
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek all analytical unit entries for the analytical kind with code = 'KIND', the analytical unit with code = 'UNIT' and the general account with number = '601'
CString strKind = "KIND", strUnit = "UNIT", strAccNum = "601";
pAnUnt->SeekByKindUnitAcc (smGreaterOrEqual, (LPCSTR)strKind, (LPCSTR)strUnit, (LPCSTR)strAccNum, COleDateTime (0, 0, 0, 0, 0, 0).m_dt);
while (pAnUnt->GetDBStatus () == 0 && (CString)pAnUnt->pAnaKind == strKind && (CString)pAnUnt->pAnaAccount == strUnit && (CString)pAnUnt->pAccount == strAccNum)
{
    // Process record data
    
    pAnUnt->GetNext ();
}

C#
 
// Seek all analytical unit entries for the analytical kind with code = 'KIND', the analytical unit with code = 'UNIT' and the general account with number = '601'
string strKind = "KIND", strUnit = "UNIT", strAccNum = "601";
oAnUnt.SeekByKindUnitAcc (eSeekMode.smGreaterOrEqual, strKind, strUnit, strAccNum, new DateTime ());
while (oAnUnt.GetDBStatus () == 0 && oAnUnt.pAnaKind.ToString () == strKind && oAnUnt.pAnaAccount.ToString () == strUnit && oAnUnt.pAccount.ToString () == strAccNum)
{
    // Process record data
    
    oAnUnt.GetNext ();
}

VBS
 
' Seek all analytical unit entries for the analytical kind with code = 'KIND', the analytical unit with code = 'UNIT' and the general account with number = '601'
Dim strKind, strUnit, strAccNum
Dim dtBookDate
strKind = "KIND"
strUnit = "UNIT"
strAccNum = "601"
Call oAnUnt.SeekByKindUnitAcc(smGreaterOrEqual, strKind, strUnit, strAccNum, dtBookDate)
While oAnUnt.GetDBStatus() = 0 And oAnUnt.pAnaKind = strKind And oAnUnt.pAnaAccount = strUnit And oAnUnt.pAccount = strAccNum
    ' Process record data
    
    Call oAnUnt.GetNext()
Wend

VB.NET
 
' Seek all analytical unit entries for the analytical kind with code = 'KIND', the analytical unit with code = 'UNIT' and the general account with number = '601'
Dim strKind, strUnit, strAccNum As String
Dim dtBookDate As Date
strKind = "KIND"
strUnit = "UNIT"
strAccNum = "601"
oAnUnt.SeekByKindUnitAcc(eSeekMode.smGreaterOrEqual, strKind, strUnit, strAccNum, dtBookDate)
While oAnUnt.GetDBStatus() = 0 And oAnUnt.pAnaKind = strKind And oAnUnt.pAnaAccount = strUnit And oAnUnt.pAccount = strAccNum
    ' Process record data
    
    oAnUnt.GetNext()
End While