# EsbCreateApplication

Description

EsbCreateApplication() creates a new application, either on the client or the server. If the application is created on the server, it is also started.

Syntax

    EsbCreateApplication (hCtx, AppName)

    ByVal hCtx    As Long
    ByVal AppName As String

Parameters

hCtx | Essbase VB API context handle.
AppName | Name of application to create. Application names can be 8 characters long, and can contain all special characters allowed in DOS file names. No spaces, commas, tabs, slashes, backslashes, or periods are allowed. The use of some special characters is not recommended because they are often used by the operating system (for example, @, $, %, and &).

Return Value

None.

Notes

- Creating a client application creates a directory to contain local application files.
- A newly created database or application is not automatically set to active. Call EsbSetActive() after calling EsbCreateDatabase() or EsbCreateApplication() to keep subsequent functions, such as EsbRestructure(), from operating on the wrong database or application (the application or database that is already active).

Access

For a server application, the caller must have application Create/Delete/Edit privilege (ESB_PRIV_APPCREATE).

Example

    Declare Function EsbCreateApplication Lib "ESBAPIW" (ByVal hCtx As Long, ByVal AppName As String) As Long

    Sub ESB_CreateApplication ()
       Dim sts As Long
       Dim AppName As String

       AppName = "Sample"

       '*******************
       ' Create Application
       '*******************
       sts = EsbCreateApplication (hCtx, AppName)
    End Sub

See Also

EsbCreateDatabase()
EsbCreateObject()