HypUIConnect
Describes the Oracle Smart View for Office VBA function, HypUIConnect.
Data provider types: Oracle Essbase, Planning, Planning Modules, Financial Consolidation and Close, Tax Reporting
Description
Use the HypUIConnect VBA function to connect to an existing private connection. HypUIConnect() always prompts for authentication where the user must provide the user name, password, and domain to log in.
HypUIConnect() can be used in two ways:
-
Using a friendly connection name.
The friendly connection name is first created using HypCreateConnection.
-
Using a connection string, in the place of a friendly name, consisting of URL, server, application, database name.
Syntax
HypUIConnect (vtSheetName, vtUserName, vtPassword, vtFriendlyName)
ByVal vtSheetName As Variant
ByVal vtUserName As Variant
ByVal vtPassword As Variant
ByVal vtFriendlyName As Variant
Parameters
vtSheetName: The name of worksheet on which to run the function. If vtSheetName is Null
or Empty
, the active worksheet is used.
vtUserName: A valid user name
vtPassword: The password for this user
vtFriendlyName: The connection name of the data provider. The friendly name parameter can accept either of the following:
-
A connection name created using HypCreateConnection
-
A connection string consisting of a URL, server name, application name, and database name, in the format
URL|server|app|db
.The
URL
component of the connection string follows the guidelines in Private Connection URL Syntax in the Oracle Smart View for Office User's Guide.
Return Value
Returns 0 if successful; otherwise, returns the appropriate error code.
Example
In this example, we connect to the Essbase Sample application, Basic database, with the friendly name of "My Sample Basic."
Public Declare PtrSafe Function HypUIConnect Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtUserName As Variant, ByVal vtPassword As Variant, ByVal vtFriendlyName As Variant) As Long
HypUIConnect("Empty", "UserName", "Password", "My Sample Basic")
Essbase Example Using a Connection String
In this example, we connect to the Essbase Sample application, Basic database.
HypUIConnect("Sheet1", "UserName", "Password", "http://hostname:19000/aps/SmartView|servername|Sample|Basic")
Planning Example Using a Connection String
In this example, we connect to the Planning Vision application, Plan1 database.
HypUIConnect("Sheet1", "UserName", "Password", "http://hostname.com:9000/HyperionPlanning/SmartView|servername|Vision|Plan1")