HypSetConnectionInfo

データ・プロバイダ・タイプ: Essbase、Planning (アド・ホックのみ)、Financial Management (アド・ホックのみ)、Hyperion Enterprise (アド・ホックのみ)

説明

HypSetConnectionInfo()は、クエリー内の接続情報を変更します。

HypSetConnectionInfo()に渡されるパラメータは、当該の接続名に保管されている接続情報と一致している必要があります。

注:

これは、動的リンク・クエリーを初期化するためにHypGetSourceGridの呼出しがすでに実行されており、アクティブなデータ・プロバイダおよびワークシート上のグリッドに関する情報が格納されていることを前提とします。

構文

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

パラメータ

vtServerName: クエリー内のサーバー名

vtUserName: クエリー内のユーザー名

vtPassword: クエリー内のユーザー・パスワード

vtApplicationName: クエリー内のアプリケーション名

vtDatabaseName: クエリー内のデータベース名

vtFriendlyName: クエリー内のわかりやすい接続名

vtURL: クエリー内のプロバイダURL

vtProviderType: クエリー内のプロバイダ・タイプ

戻り値

正常に終了した場合は0を戻し、それ以外の場合は該当するエラー・コードを戻します。

      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