Venice
AnCnt::SeekByCentreKindDate
 
Seeks an Analytical Centre entry by its centre, kind and book date.
 
VARIANT_BOOL SeekByCentreKindDate (
    enum eSeekMode eSeekMode,
    BSTR bsCentre,
    BSTR bsKind,
    DATE dBookDate
)
 
Key information
This method uses key number 5 (See SwapKey).
This key allows duplicates.
 
Key segment information
Segment NameTypeOrderCollation
pAnaAccountBSTRAscendingHierarchy
pAnaKindBSTRAscendingHierarchy
pBookDateDATE (date)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsCentre
[in] The analytical centre of the analytical entry you want to seek.
bsKind
[in] The analytical kind 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 centre with code = 'CENT' and the analytical kind with code = 'KIND'
CString strCentre = "CENT", strKind = "KIND";
pAnCnt->SeekByCentreKindDate (smGreaterOrEqual, (LPCSTR)strCentre, (LPCSTR)strKind, COleDateTime (0, 0, 0, 0, 0, 0).m_dt);
while (pAnCnt->GetDBStatus () == 0 && (CString)pAnCnt->pAnaAccount == strCentre && (CString)pAnCnt->pAnaKind == strKind)
{
    // Process record data
    
    pAnCnt->GetNext ();
}

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

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

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