HypGetConnectionInfo

Data source types:Essbase, Planning (ad hoc only), Financial Management (ad hoc only), Hyperion Enterprise (ad hoc only)

Description

HypGetConnectionInfo() returns the connection information for the dynamic link query.

HypGetConnectionInfo assumes that a call has already been made to HypGetSourceGrid to initialize the dynamic link query, which contains the information about the active data source and the grid on the sheet.

Note:

This function is used specifically with dynamic link views, as described in VBA Functions and Dynamic Link Views.

Note:

After a call, the password is not actually returned, but for security reasons, is returned as empty.

Syntax

HypGetConnectionInfo(vtServerName, vtUserName,vtApplicationName,vtDatabaseName,vtFriendlyName,vtURL,vtProviderType)

ByRef vtServerName As Variant

ByRef vtUserName As Variant

ByRef vtApplicationName As Variant

ByRef vtDatabaseName As Variant

ByRef vtFriendlyName As Variant

ByRef vtURL As Variant

ByRef vtProviderType As Variant

Parameters

vtServerName: Output. Contains the server name for the dynamic link query.

vtUserName: Output. Contains the user name for the dynamic link query.

vtApplicationName: Output. Contains the application name for the dynamic link query.

vtDatabaseName: Output. Contains the database name for the dynamic link query.

vtFriendlyName: Output. Contains the friendly connection name for the dynamic link query.

vtURL: Output. Contains the URL for the dynamic link query.

vtProviderType: Output. Contains provider type for the dynamic link query.

Return Value

Returns 0 if successful; otherwise, returns the appropriate error code.

Example

Declare Function HypGetConnectionInfo Lib "HsAddin" (ByRef vtServerName As Variant, ByRef vtUserName As Variant, ByRef vtApplicationName As Variant, ByRef vtDatabaseName As Variant, ByRef vtFriendlyName As Variant, ByRef vtURL As Variant, ByRef vtProviderType As Variant) As Long

Sub Macro()
   Dim vtGrid as Variant
   Dim server As Variant
   Dim user As Variant
   Dim app As Variant
   Dim db As Variant
   Dim provider As Variant
   Dim conn As Variant
   Dim url As Variant
   Sts = HypConnect(Empty, "system", "MyDemoBasic")
   Sts = HypRetrieve(Empty)
   Range (“B2”).Select
   Sts = HypGetSourceGrid (Empty, vtGrid)
   Sts = HypGetConnectionInfo(server,user, app, db, conn, url, provider)
End sub