Condividi tramite


DatabaseRole Constructor (Database, String)

Initializes a new instance of the DatabaseRole class.

Spazio dei nomi: Microsoft.SqlServer.Management.Smo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Sintassi

'Dichiarazione
Public Sub New ( _
    database As Database, _
    name As String _
)
public DatabaseRole (
    Database database,
    string name
)
public:
DatabaseRole (
    Database^ database, 
    String^ name
)
public DatabaseRole (
    Database database, 
    String name
)
public function DatabaseRole (
    database : Database, 
    name : String
)

Parametri

  • database
    A Database object value that specifies the database on which to create the role.
  • name
    A String value that specifies the name of the database role.

Osservazioni

Questo spazio dei nomi, classe o membro è supportato solo nella versione 2.0 di Microsoft .NET Framework.

Esempio

How to: Construct an Object in Visual Basic .NET

Piattaforme

Piattaforme di sviluppo

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Piattaforme di destinazione

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Vedere anche

Riferimento

DatabaseRole Class
DatabaseRole Members
Microsoft.SqlServer.Management.Smo Namespace

Altre risorse

Managing Users, Roles, and Logins
Database Roles
CREATE ROLE (Transact-SQL)