Share via


ResetAccountPassword Method

Description

Resets a Microsoft Office Project Server 2003 user's password using the Project Server security object.

Syntax

Function ResetAccountPassword( _
   ByVal lResID As Long, _
   ByVal bstrPasswd As String _
) As Long

Parameters

Parameter Description

lResID

Required Long. The user's ID from MSP_WEB_RESOURCES.WRES_ID.

bstrPasswd

Required String. The new password.

Return Value

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

Example

The following example is for Microsoft Visual Basic 6.0.

Dim lResult as Long
Set oSec = CreateObject("PjSvrSecurity.PjSvrSecurity")
oSec.SetDBConnection "ProjectServer"
lResult = oSec.ResetAccountPassword(122, "NewPassword")
Set oSec = Nothing