DeleteTemplate Method

Description

Deletes a specified security template using the Microsoft Office Project Server 2003 security object.

Syntax

Function DeleteTemplate( _
   ByVal lTemplateID As Long _
) As Long

Parameters

Parameter Description

lTemplateID

Required Long. The template ID to delete from MSP_WEB_SECURITY_TEMPLATES.WSEC_TMPL_ID.

Return Value

The DeleteTemplate method returns HRESULT as a Long (4-byte integer) value.

Example

The following example deletes the Portfolio Manager security template. The example is for Microsoft Visual Basic 6.0.

Dim lResult as Long
Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity")
oSec.SetDBConnection "ProjectServer"
lResult = oSec.DeleteTemplate(3)
Set oSec = Nothing