PreviousDTI Programmer's Guide (v10) Next

PvCreateUser()

Chapter contents

Creates a new user in the existing database. Optionally set a password and assign the new user to an existing group.

Header file: DDF.H
Requires: W3DBAV90.DLL

Syntax

PRESULT DDFAPICALLTYPE PvCreateUser( 
	BTI_WORD            dbHandle, 
	const BTI_CHAR*     user, 
	const BTI_CHAR*     password, 
	const BTI_CHAR*     group); 

Arguments

In
dbHandle
Handle of an open database returned by PvOpenDatabase().
In
user
Database user name.
In
password
User password. If set to NULL, no password is set.
In
group
Database group name for user. If set to NULL, user is not assigned to a group.

Return Values

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

Remarks

The following preconditions must be met:

The following post condition must be met:

See Also

PvAlterUserName()
PvAlterUserPassword()
PvAddUserToGroup()
PvRemoveUserFromGroup()
PvCreateGroup()
PvDropUser()
PvOpenDatabase()
PvCloseDatabase()


Chapter contents
Book contents

Prev topic: PvCreateGroup()
Next topic: PvDeleteDSN()