หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
The HasDBAccess property reports whether a user has explicit permissions to access a database.
Syntax
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);
Remarks
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.