HypSetConnectionInfo
Describes the Oracle Smart View for Office VBA function, HypSetConnectionInfo.
Cloud data provider types: Oracle Essbase, Planning, Planning Modules, Financial Consolidation and Close, Tax Reporting
On-premises data provider types: Oracle Essbase, Oracle Hyperion Planning, Oracle Hyperion Financial Management
Description
HypSetConnectionInfo() modifies the connection information in the query.
The parameters passed for HypSetConnectionInfo() must match the connection information stored with that connection name.
Note:
It is assumed that a call has already been made to HypGetSourceGrid to initialize the dynamic link query, which contains the information about the active data provider and the grid on the worksheet.
Syntax
HypSetConnectionInfo (vtServerName, vtUserName, vtPassword, vtApplicationName, vtDatabaseName, vtFriendlyName, vtURL, vtProviderType)
ByVal vtServerName As Variant
ByVal vtUserName As Variant
ByVal vtPassword As Variant
ByVal vtApplicationName As Variant
ByVal vtDatabaseName As Variant
ByVal vtFriendlyName As Variant
ByVal vtURL As Variant
ByVal vtProviderType As Variant
Parameters
vtServerName: The server name in the query
vtUserName: The user name in the query
vtPassword: The user password in the query
vtApplicationName: The application name in the query
vtDatabaseName: The database name in the query
vtFriendlyName: The friendly connection name in the query
vtURL: The provider URL in the query
vtProviderType: The provider type in the query
Return Value
Returns 0 if successful; otherwise, returns the appropriate error code.
Example
Declare Function HypSetConnectionInfo Lib "HsAddin" (ByVal vtServerName As Variant, ByVal vtUserName As Variant, ByVal vtPassword As Variant, ByVal vtApplicationName As Variant, ByVal vtDatabaseName As Variant, ByVal vtFriendlyName As Variant, ByVal vtURL As Variant, ByVal vtProviderType As Variant) As Long
Sub Example_HypSetConnectionInfo()
Dim vtGrid As Variant
Sts = HypConnect(Empty, "UserName", "Password", "DemoBasic")
Sts = HypRetrieve(Empty)
Range("B2").Select
Sts = HypGetSourceGrid(Empty, vtGrid)
Sts = HypSetConnectionInfo("localhost", "UserName", "Password", "Sample", "Basic", "SampleBasic", "http://localhost:13080/aps/SmartView", provider)
End Sub