|
Seeks an Entry record by its journal. |
|
|
VARIANT_BOOL SeekByJournal ( enum eSeekMode eSeekMode, enum eBookType eBookType, BSTR bsBook, DATE dBookDate, LONG lDocNum, SHORT sEntryNum ) |
|
|
Key information | | This method uses key number 2 (See SwapKey). | | This is a unique key. |
| | Key segment information | Segment Name | Type | Order | Collation | pBookType | BYTE | Ascending | - | pBook | BSTR | Ascending | Case insensitive | pBookDate | DATE (date) | Ascending | - | pDocNum | LONG (unsigned) | Ascending | - | pEntryNum | SHORT (unsigned) | Ascending | - |
| | Parameters | eSeekMode | [in] A value of the 'eSeekMode' enumeration. | eBookType | [in] A value of the 'eBookType' enumeration. | bsBook | [in] The book code of the Entry record you want to seek. | dBookDate | [in] The book date of the Entry record you want to seek. | lDocNum | [in] The document number of the Entry record you want to seek. | sEntryNum | [in] The entry number of the Entry record you want to seek. | | Return value |
True if the record with the given properties was found, otherwise false. |
|
See Also |
|
|
|
Samples |
|
|
C++ |
|
// Seek all entry records of sales documents with book code = 'ASALS' and book date = 28/06/2024
CString strBook = "ASALS";
COleDateTime odtBookDate;
odtBookDate.SetDate (2024, 6, 28);
eBookType eBT = btSales;
pEntry->SeekByJournal (smGreaterOrEqual, eBT, (LPCSTR)strBook, odtBookDate, 0, 0);
while (pEntry->GetDBStatus () == 0 && (BYTE)pEntry->pBookType == eBT && (CString)pEntry->pBook == strBook && (DATE)pEntry->pBookDate == odtBookDate)
{
// Process record data
pEntry->GetNext ();
}
|
|
|
C# |
|
// Seek all entry records of sales documents with book code = 'ASALS' and book date = 28/06/2024
string strBook = "ASALS";
DateTime dtBookDate = new DateTime (2024, 6, 28);
eBookType eBT = eBookType.btSales;
oEntry.SeekByJournal (eSeekMode.smGreaterOrEqual, eBT, strBook, dtBookDate, 0, 0);
while (oEntry.GetDBStatus () == 0 && (eBookType)((byte)oEntry.pBookType) == eBT && oEntry.pBook.ToString () == strBook && (DateTime)oEntry.pBookDate == dtBookDate)
{
// Process record data
oEntry.GetNext ();
}
|
|
|
VBS |
|
' Seek all entry records of sales documents with book code = 'ASALS' and book date = 28/06/2024
Dim strBook
Dim dtBookDate
Dim eBT
strBook = "ASALS"
dtBookDate = #6/28/2024#
eBT = btSales
Call oEntry.SeekByJournal(smGreaterOrEqual, eBT, strBook, dtBookDate, 0, 0)
While oEntry.GetDBStatus() = 0 And oEntry.pBookType = eBT And oEntry.pBook = strBook And oEntry.pBookDate = dtBookDate
' Process record data
Call oEntry.GetNext()
Wend
|
|
|
VB.NET |
|
' Seek all entry records of sales documents with book code = 'ASALS' and book date = 28/06/2024
Dim strBook As String
Dim dtBookDate As Date
Dim eBT As eBookType
strBook = "ASALS"
dtBookDate = #6/28/2024#
eBT = eBookType.btSales
oEntry.SeekByJournal(eSeekMode.smGreaterOrEqual, eBT, strBook, dtBookDate, 0, 0)
While oEntry.GetDBStatus() = 0 And oEntry.pBookType = eBT And oEntry.pBook = strBook And oEntry.pBookDate = dtBookDate
' Process record data
oEntry.GetNext()
End While
|
|