SetDBConnection Method

Description

Sets the proper context for the active instance of the Microsoft Office Project Server 2003 security object.

Syntax

Sub SetDBConnection( _
   ByVal bstrServerBasepath As String)

Parameters

Parameter Description

bstrServerBasepath

Required String. The base path for the Project Server instance. This string is the name of the Project Server virtual directory.

Return Value

The SetDBConnection method returns no value (Void).

Remarks

You must call SetDBConnection prior to calling any other security object methods. Project Server Active Server Pages (ASP) files automatically call SetDBConnection when an instance of the security object is created.

Example

The following example is for Microsoft Visual Basic 6.0.

Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity")
oSec.SetDBConnection "ProjectServer"
' Calls to other security object methods.
Set oSec = Nothing