Skip to content

Latest commit

 

History

History
68 lines (54 loc) · 2.58 KB

setpermissions-method-adox.md

File metadata and controls

68 lines (54 loc) · 2.58 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords apitype
SetPermissions Method (ADOX)
SetPermissions Method (ADOX)
rothja
jroth
01/19/2017
sql
ado
reference
User25::SetPermissions
User25::raw_SetPermissions
_Group25::SetPermissions
_Group25::raw_SetPermissions
SetPermissions method [ADOX]
COM

SetPermissions Method (ADOX)

Specifies the permissions for a group or user on an object.

Syntax

  
GroupOrUser.SetPermissions Name, ObjectType, Action, Rights [, Inherit] [, ObjectTypeId]  

Parameters

Name
A String value that specifies the name of the object for which to set permissions.

ObjectType
A Long value which can be one of the ObjectTypeEnum constants, that specifies the type of the object for which to get permissions.

Action
A Long value which can be one of the ActionEnum constants that specifies the type of action to perform when setting permissions.

Rights
A Long value which can be a bitmask of one or more of the RightsEnum constants, that indicates the rights to set.

Inherit
Optional. A Long value which can be one of the InheritTypeEnum constants, that specifies how objects will inherit these permissions. The default value is adInheritNone.

ObjectTypeId
Optional. A Variant value that specifies the GUID for a provider object type that is not defined by the OLE DB specification. This parameter is required if ObjectType is set to adPermObjProviderSpecific; otherwise, it is not used.

Remarks

An error will occur if the provider does not support setting access rights for groups or users.

Note

When calling SetPermissions, setting Actions to adAccessRevoke overrides any settings of the Rights parameter. Do not set Actions to adAccessRevoke if you want the rights specified in the Rights parameter to take effect.

Applies To

:::row::: :::column::: Group Object (ADOX)
:::column-end::: :::column::: User Object (ADOX)
:::column-end::: :::row-end:::

See Also

GetPermissions and SetPermissions Methods Example (VB)
GetPermissions Method (ADOX)
Name Property (ADOX)