DropMember Method (SQL-DMO)

The DropMember method removes the specified Microsoft® SQL Server™ user, database role, or login from the role referenced.

Applies To
DatabaseRole Object ServerRole Object

Syntax

object.DropMember( User )

Part Description
object Expression that evaluates to an object in the Applies To list.
User For the DatabaseRole object, a string specifying an existing database user or role by name. For the ServerRole object, a string specifying an existing SQL Server login by name.

Remarks

Configuring role membership by using the DropMember method of the Database and ServerRole objects requires appropriate privilege.

For the Database object, the database user mapped to the SQL Server login used for SQLServer object connection must be a member of the fixed database role db_owner.

For the ServerRole object, the SQL Server login used for SQLServer object connection must be a member of the role from which the specified login will be dropped.

Prototype (C/C++)

HRESULT DropMember(SQLDMO_LPCSTR NewValue);


(c) 1988-98 Microsoft Corporation. All Rights Reserved.