HypGetConnectionInfo

Data provider 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.

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

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

ByRef vtServerName As Variant

ByRef vtUserName As Variant

ByRef vtPassword 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 parameter; the name of the server for the dynamic link query

vtUserName: Output parameter; the user name for the dynamic link query

vtPassword: Output parameter; the password for the dynamic link query. Note: The actual password is not returned for security reasons; it is returned as Empty.

vtApplicationName: Output parameter; the application name for the dynamic link query

vtDatabaseName: Output parameter; the database name for the dynamic link query

vtFriendlyName: Output parameter; the friendly connection name for the dynamic link query

vtURL: Output parameter; the URL for the dynamic link query

vtProviderType: Output parameter; the 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 vtPassword 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 Example_HypGetConnectionInfo()
   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, "UserName", "MyDemoBasic")
   Sts = HypRetrieve(Empty)
   Range ("B2").Select
   Sts = HypGetSourceGrid (Empty, vtGrid)
   Sts = HypGetConnectionInfo(server,user, pwd, app, db, conn, url, provider)
End sub