Venice
POrder::SeekByOpenStatus
 
Seeks an open Purchase Order by its book and document number.
 
VARIANT_BOOL SeekByOpenStatus (
    enum eSeekMode eSeekMode,
    BSTR bsBook,
    LONG lDocNum
)
 
Key information
This method uses key number 5 (See SwapKey).
This is a unique key.
This is a null key, only the records where pIsOpen is true are in the index.
 
Key segment information
Segment NameTypeOrderCollation
pBookBSTRAscendingCase insensitive
pDocNumLONG (unsigned)Ascending-
pIsOpenVARIANT_BOOLAscending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsBook
[in] The book code of the Purchase Order you want to seek.
lDocNum
[in] The document number of the Purchase Order you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreatePOrder
GetDBStatus
GetNext
 
Samples
 
C++
 
// Process all records that are still open
pPOrder->SeekByOpenStatus (smFirst, "", 0);
while (pPOrder->GetDBStatus () == 0)
{
    // Process record data

    pPOrder->GetNext ();
}

// Check if the document with book code = 'Book' and document number = 12 is still open
if (pPOrder->SeekByOpenStatus (smEqual, "Book", 12))
    // Record is still open

C#
 
// Process all records that are still open
oPOrder.SeekByOpenStatus (eSeekMode.smFirst, "", 0);
while (oPOrder.GetDBStatus () == 0)
{
    // Process record data

    oPOrder.GetNext ();
}

// Check if the document with book code = 'Book' and document number = 12 is still open
if (oPOrder.SeekByOpenStatus (eSeekMode.smEqual, "Book", 12))
    // Record is still open

VBS
 
' Process all records that are still open
Call oPOrder.SeekByOpenStatus(smFirst, "", 0)
While oPOrder.GetDBStatus() = 0
    ' Process record data

    Call oPOrder.GetNext()
Wend

' Check if the document with book code = 'Book' and document number = 12 is still open
If oPOrder.SeekByOpenStatus(smEqual, "Book", 12) Then
    ' Record is still open
End If

VB.NET
 
' Process all records that are still open
oPOrder.SeekByOpenStatus(eSeekMode.smFirst, "", 0)
While oPOrder.GetDBStatus() = 0
    ' Process record data

    oPOrder.GetNext()
End While

' Check if the document with book code = 'Book' and document number = 12 is still open
If oPOrder.SeekByOpenStatus(eSeekMode.smEqual, "Book", 12) Then
    ' Record is still open
End If