Essbase uses a message database file called, by default, ESSBASE.MDB. The API enables you to store the message database file with any file name and in any directory path you choose. You must use the ESSBASE.MDB file, but you can rename it. Using the MessageFile field of ESX_INIT_T, you can explicitly set the location and name of the message database.
Setting the MessageFile Field of the Initialization Structure
You can change the message database file name and directory path by setting the MessageFile field in the initialization structure to point to a string indicating the full path and file name of the message database. This causes the Essbase message system to look for the path and file name specified whenever it needs to reference the text of an Essbase system message. For example, if you wanted to call the message database file PRODUCT.MDB, and install it in the C:\PRODUCT\MESSAGE directory, you would make the following change to the initialization structure: ESS_INIT_T InitStruct;Initstruct.MessageFile = "C:\PRODUCT\MESSAGE\PRODUCT.MDB";
For Visual Basic,
Dim pInit as ESB_INIT_T pInit.MessageFile="C:\PRODUCT\MESSAGE\PRODUCT.MDB"
If you don't want to set the name and location explicitly, you can set the MessageFile field to NULL. By default, the API looks for a fully qualified file name in the ARBORMSGPATH environment variable on the user's machine. If this variable is not set, the API uses the ESSBASEPATH environment variable, appends \BIN to it, and uses that directory name to look for ESSBASE.MDB.
Setting the ARBORMSGPATH Variable
If you want to use the ARBORMSGPATH environment variable, place an ARBORMSGPATH statement in yourAUTOEXEC.BAT file if you are programming on a Windows platform. Under UNIX, you set this variable in the environment script corresponding to your shell. See the Installation Notes topic for more information. To set the path and file name to C:\PRODUCT\MESSAGE\PRODUCT.MDB you would use the following statement: ARBORMSGPATH = C:\PRODUCT\MESSAGE\PRODUCT.MDB
If you intend to use the ARBORMSGPATH or the ESSBASEPATH environment variable, set the MessageFile field in ESX_INIT_T to NULL.
How Essbase Finds the Message Database
Essbase performs the following priority search to find the message database:
Essbase uses the directory path and file name specified in the MessageFile field of the initialization structure.
If the MessageFile field is set to NULL, Essbase uses the complete file and directory path specified in the ARBORMSGPATH environment variable.
If no ARBORMSGPATH variable is defined, Essbase uses the file name ESSBASE.MDB in the directory path specified in the ESSBASEPATH environment variable, in its BIN sub-directory.
If no ESSBASEPATH variable is defined, Essbase displays an error message.