Sets the caller's active application and database.
Syntax
EsbSetActive (hCtx, AppName, DbName, pAccess) ByVal hCtx As Long ByVal AppName As String ByVal DbName As String ByVal pAccess As Integer
Parameter | Description |
---|---|
hCtx | VB API context handle. |
AppName | Application name. |
DbName | Database name. |
pAccess | Address of variable to receive the user's access level to the selected Database. See Table 15 for a list of possible values for this field. |
Notes
If the application and database have not been loaded, this function will load them.
The EsbAutoLogin() function can also be used to allow a user to login and set the active application and database.
Return Value
If successful, returns the user's access level to the selected application and database in pAccess.
Access
This function requires no special privileges.
Example
Declare Function EsbSetActive Lib "ESBAPIN" (ByVal hCtx As Long, ByVal AppName As String, ByVal DbName As String, Access As Integer) As Long Sub ESB_SetActive () Dim AppName As String Dim DbName As String Dim pAccess As Integer Dim sts As Long AppName = "Demo" DbName = "Basic" '********************************** ' Set active Application & Database '********************************** sts = EsbSetActive (hCtx, AppName, DbName, pAccess) End Sub
See Also