UserName Property

See Also    Example    Applies To

Sets or returns a value that represents a user, a group of users, or the owner of a CdbWorkspace object.

Syntax

VOIDSetUserName(LPCTSTR pstrName );

CStringGetUserName(VOID);

Parameters

Type Argument Description
LPCTSTR pstrName A pointer to a string that contains the name of a user.

Remarks

In a Microsoft Jet workspace, this property represents a CdbUser object in the Users collection or a CdbGroup object in the Groups collection. For Microsoft Jet CdbContainer and CdbDocument objects, this property setting is read/write. For all CdbWorkspace objects, this property setting is read-only.

Depending on the type of object, the UserName property represents the following:

To find or set the permissions for a particular user or group of users, first set the UserName property to the user or group name that you want to examine. Then check the Permissions property setting to determine what permissions that user or group of users has, or set the Permissions property to change the permissions.

For a CdbWorkspace object, check the UserName property setting to determine the owner of the CdbWorkspace object. Set the UserName property to establish the owner of the CdbWorkspace object before you append the object to the Workspaces collection.