Project::SeekByTemplate (Interface: Project)
 
Seeks a Project by its template code.
 
VARIANT_BOOL SeekByTemplate (
    enum eSeekMode eSeekMode,
    BSTR bsTemplateCode,
    LONG lNumber
)
 
Key information
This method uses key number 5 (See SwapKey).
This is a unique key.
 
Key segment information
Segment NameTypeOrderCollation
pTemplateCodeBSTRAscendingCase insensitive
pNumberLONG (unsigned)Ascending-
 
Parameters
eSeekMode
[in] A value of the 'eSeekMode' enumeration.
bsTemplateCode
[in] The template code 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 with template code 'DOCU'
CString strTemplateCode = "DOCU";
pProject->SeekByTemplate (smGreater, (LPCSTR)strTemplateCode, 0);
while (pProject->GetDBStatus () == 0 && (CString)pProject->pTemplateCode == strTemplateCode)
{
    // Process record data
    
    pProject->GetNext ();
}

C#
 
// Seek all projects with template code 'DOCU'
string strTemplateCode = "DOCU";
oProject.SeekByTemplate (eSeekMode.smGreater, strTemplateCode, 0);
while (oProject.GetDBStatus () == 0 && oProject.pTemplateCode.ToString () == strTemplateCode)
{
    // Process record data
    
    oProject.GetNext ();
}

VBS
 
' Seek all projects with template code 'DOCU'
Dim strTemplateCode
strTemplateCode = "DOCU"
Call oProject.SeekByTemplate(smGreater, strTemplateCode, 0)
While oProject.GetDBStatus() = 0 And oProject.pTemplateCode = strTemplateCode
    ' Process record data

    Call oProject.GetNext()
Wend

VB.NET
 
' Seek all projects with template code 'DOCU'
Dim strTemplateCode As String
strTemplateCode = "DOCU"
oProject.SeekByTemplate(eSeekMode.smGreater, strTemplateCode, 0)
While oProject.GetDBStatus() = 0 And oProject.pTemplateCode = strTemplateCode
    ' Process record data

    oProject.GetNext()
End While