Venice
AnCnt::SeekByKindCentreAcc
 
Seeks an Analytical Centre entry by its kind, centre and account.
 
VARIANT_BOOL SeekByKindCentreAcc (
    enum eSeekMode eSeekMode,
    BSTR bsKind,
    BSTR bsCentre,
    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.
bsCentre
[in] The analytical centre 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
CreateAnCnt
GetDBStatus
GetNext
 
Samples
 
C++
 
// Seek all analytical centre entries for the analytical kind with code = 'KIND', the analytical centre with code = 'CENT' and the general account with number = '601'
CString strKind = "KIND", strCentre = "CENT", strAccNum = "601";
pAnCnt->SeekByKindCentreAcc (smGreaterOrEqual, (LPCSTR)strKind, (LPCSTR)strCentre, (LPCSTR)strAccNum, COleDateTime (0, 0, 0, 0, 0, 0).m_dt);
while (pAnCnt->GetDBStatus () == 0 && (CString)pAnCnt->pAnaKind == strKind && (CString)pAnCnt->pAnaAccount == strCentre && (CString)pAnCnt->pAccount == strAccNum)
{
    // Process record data
    
    pAnCnt->GetNext ();
}

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

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

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