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
ParameterDescription

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

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