Sets a user database access structure, which contains information about user access to a database.
Syntax
EsbSetDatabaseAccess (hCtx, Items, pUserDb) ByVal hCtx As Long ByVal Items As Integer ByVal pUserDb As ESB_USERDB_T
Parameter | Description |
---|---|
hCtx | VB API context handle. |
Items | Reserved for future use. |
pUserDb | Pointer to a user database structure. |
Notes
The Access field of the user database structure is used to set the user's granted access to the database. For this call the MaxAccess and FilterName fields are ignored.
Return Value
None.
Access
This function requires the caller to have Database Manager privilege (ESB_PRIV_DBDESIGN) for the specified database.
Example
Declare Function EsbSetDatabaseAccess Lib "ESBAPIN" (ByVal hCtx As Long, ByVal Items As Integer, UserDb As ESB_USERDB_T) As Long Sub EsbSetDatabaseAccess () Dim sts As Long Dim hCtx As Long Dim Items As Integer Dim UserDb As ESB_USERDB_T '***************************** ' Initialize UserDb structure '***************************** UserDb.UserName = "Joseph" UserDb.AppName = "Sample" UserDb.DbName = "Basic" UserDb.Access = ESB_ACCESS_SUPER UserDb.MaxAccess = ESB_ACCESS_SUPER UserDb.FilterName = "" '*************************** ' Set Administrator access level '*************************** sts = EsbSetDatabaseAccess (hCtx, Items, UserDb) End Sub
See Also