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