Venice
Project::SeekByOpenTmpl
 
Seeks an open Project by its template code.
 
VARIANT_BOOL SeekByOpenTmpl (
    enum eSeekMode eSeekMode,
    BSTR bsTemplateCode,
    LONG lNumber
)
 
Key information
This method uses key number 6 (See SwapKey).
This is a unique key.
This is a null key, only the records where pTemplateCode is not blank and pClosed is false are in the index.
 
Key segment information
Segment NameTypeOrderCollation
pTemplateCodeBSTRAscendingCase insensitive
pNumberLONG (unsigned)Ascending-
pClosedVARIANT_BOOLAscending-
 
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 open projects with template code 'DOCU'
CString strTemplateCode = "DOCU";
pProject->SeekByOpenTmpl (smGreater, (LPCSTR)strTemplateCode, 0);
while (pProject->GetDBStatus () == 0 && (CString)pProject->pTemplateCode == strTemplateCode)
{
    // Process record data
    
    pProject->GetNext ();
}

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

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

    Call oProject.GetNext()
Wend

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

    oProject.GetNext()
End While