Share via


PermissionInfo.ObjectID Property

Gets the ID value that uniquely identifies the object to which the permission applies.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public ReadOnly Property ObjectID As Integer 
    Get
'Usage
Dim instance As PermissionInfo 
Dim value As Integer 

value = instance.ObjectID
public int ObjectID { get; }
public:
property int ObjectID {
    int get ();
}
member ObjectID : int
function get ObjectID () : int

Property Value

Type: System.Int32
An Int32 value that specifies the ID value that uniquely identifies the object.

Remarks

The ObjectID property is 0 for a Server object or a Database object. Otherwise, it specifies the ID of the object within the class specified by the ObjectClass property.

Examples

Granting, Revoking, and Denying Permissions

See Also

Reference

PermissionInfo Class

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Permissions (Database Engine)

sys.syspermissions (Transact-SQL)