HypGetConnectionInfo
Describes the Oracle Smart View for Office VBA function, HypGetConnectionInfo.
Cloud data provider types: Oracle Analytics Cloud - Essbase, Planning (ad hoc only),
On-premises data provider types: Oracle Essbase, Oracle Hyperion Planning (ad hoc only), Oracle Hyperion Financial Management (ad hoc only)
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.
Description
HypGetConnectionInfo() returns the connection information for the dynamic link query.
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