Venice
Project::SeekByCategory
 
Seeks a Project by its category.
 
VARIANT_BOOL SeekByCategory (
    enum eSeekMode eSeekMode,
    BSTR bsCategory,
    LONG lNumber
)
 
Key information
This method uses key number 10 (See SwapKey).
This is a unique key.
 
Key segment information
Segment NameTypeOrderCollation
pCategoryBSTRAscendingCase insensitive
pNumberLONG (unsigned)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsCategory
[in] The category of the project you want to seek.
lNumber
[in] The number of the project you want to seek.
 
Return value
True if the record with the given properties was found, otherwise false.
 
See Also
CreateProject
 
Samples
 
C++
 
// Seek all projects in category 'Cat1'
CString strCategory = "Cat1";
pProject->SeekByCategory (smGreater, (LPCSTR)strCategory, 0);
while (pProject->GetDBStatus () == 0 && (CString)pProject->pCategory == strCategory)
{
    // Process record data
    
    pProject->GetNext ();
}

C#
 
// Seek all projects in category 'Cat1'
string strCategory = "Cat1";
oProject.SeekByCategory (eSeekMode.smGreater, strCategory, 0);
while (oProject.GetDBStatus () == 0 && oProject.pCategory.ToString () == strCategory)
{
    // Process record data
    
    oProject.GetNext ();
}

VBS
 
' Seek all projects in category 'Cat1'
Dim strCategory
strCategory = "Cat1"
Call oProject.SeekByCategory(smGreater, strCategory, 0)
While oProject.GetDBStatus() = 0 And oProject.pCategory = strCategory
    ' Process record data

    Call oProject.GetNext()
Wend

VB.NET
 
' Seek all projects in category 'Cat1'
Dim strCategory As String
strCategory = "Cat1"
oProject.SeekByCategory(eSeekMode.smGreater, strCategory, 0)
While oProject.GetDBStatus() = 0 And oProject.pCategory = strCategory
    ' Process record data

    oProject.GetNext()
End While