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

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

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

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