PreviousDTI Programmer's Guide (v10) Next

PvAlterUserName()

Chapter contents

Alters an existing user's name in the specified database.

Header file: DDF.H
Requires: W3DBAV90.DLL

Syntax

PRESULT DDFAPICALLTYPE PvAlterUserName( 
	BTI_WORD            dbHandle, 
	const BTI_CHAR*     user, 
	const BTI_CHAR*     newName); 

Arguments

In
dbHandle
Handle of an open database returned by PvOpenDatabase().
In
user
Database user name.
In
newName
New name for the database user. If set to NULL, the function fails.

Return Values

PCM_Success
The operation was successful.
PCM_errFailed
The operation was not successful.
PCM_errInvalidAccountName
The specified account or user name does not exist, or the new name is invalid.
PCM_errUserAlreadyExists
New user name already exists.
PCM_errDatabaseHasNoSecurity
Database has no security.
PCM_errSessionSecurityError
Database opened with insufficient privilege.

Remarks

This function will fail if newName is set to NULL, or if newName is already present in the database.

The following preconditions must be met:

The following post condition must be met:

See Also

PvAlterUserPassword()
PvAddUserToGroup()
PvRemoveUserFromGroup()
PvCreateUser()
PvDropUser()
PvOpenDatabase()
PvCloseDatabase()


Chapter contents
Book contents

Prev topic: PvAddUserToGroup()
Next topic: PvAlterUserPassword()