EsbSetActive

Description

EsbSetActive() 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

Parameters

hCtxEssbase VB API context handle.
AppNameApplication name.
DbNameDatabase name.
pAccessAddress of variable to receive the user's access level to the selected Database. See Bitmask Data Types for a list of possible values for this field.

Return Value

If successful, returns the user's access level to the selected application and database in pAccess.

Notes

Access

This function requires no special privileges.

Example

Declare Function EsbSetActive Lib "ESBAPIW" (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

EsbClearActive()
EsbGetActive()
EsbListApplications()
EsbListDatabases()
EsbLogin()
EsbSetActive()