共用方式為


Database.Grant Method

Grants the specified set of permissions to the specified grantees on the database.

備註

只有 Microsoft .NET Framework 2.0 版支援此命名空間、類別或成員。

多載清單

名稱 Description
Database.Grant (DatabasePermissionSet, String)
Grants the specified set of permissions to the specified grantee on the database.
Database.Grant (DatabasePermissionSet, String[])
Grants the specified set of permissions to the specified grantees on the database.
Database.Grant (DatabasePermissionSet, String, Boolean)
Grants access to the specified permission to the grantee and the ability to grant access to other users on the database.
Database.Grant (DatabasePermissionSet, String[], Boolean)
Grants access to the specified permission to the grantees and the ability to grant access to other users on the database.
Database.Grant (DatabasePermissionSet, String, Boolean, String)
Grants the specified set of permissions to the grantee and the ability to grant the set of permissions to other users on the database under an assumed role.
Database.Grant (DatabasePermissionSet, String[], Boolean, String)
Grants the specified set of permissions to the grantees and the ability to grant the set of permissions to other users on the database under an assumed role.

請參閱

參考

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

其他資源

How to: Create, Alter, and Remove a Database in Visual Basic .NET
Granting, Revoking, and Denying Permissions
Creating, Altering, and Removing Databases
CREATE DATABASE (Transact-SQL)