HasDBAccess Property
未來的 Microsoft SQL Server 發行版本將不再提供此功能。請避免在新的開發工作中使用此功能,並計劃修改目前使用此功能的應用程式。
The HasDBAccess property reports whether a user has explicit permissions to access a database.
語法
object
.HasDBAccess
Parts
- object
An expression that evaluates to an object in the Applies To list
Data Type
Boolean
Modifiable
Read-only
Prototype (C/C++)
HRESULT GetHasDBAccess (LPBOOL pRetVal);
備註
After a connection is established to Microsoft SQL Server, an application can use the HasDBAccess property to determine whether a user has explicit access to a particular database. If HasDBAccess returns FALSE, the user does not have access. Use the Grant, Deny, or Revoke methods to manipulate user database permissions.