次の方法で共有


AxisCollection Class

CellSet に含まれる Axis オブジェクトの読み取り専用のコレクションを取得します。

名前空間: Microsoft.AnalysisServices.AdomdClient
アセンブリ: Microsoft.AnalysisServices.AdomdClient (microsoft.analysisservices.adomdclient.dll 内)

構文

'宣言
<DefaultMemberAttribute("Item")> _
Public NotInheritable Class AxisCollection
    Implements ICollection, IEnumerable
[DefaultMemberAttribute("Item")] 
public sealed class AxisCollection : ICollection, IEnumerable
[DefaultMemberAttribute(L"Item")] 
public ref class AxisCollection sealed : ICollection, IEnumerable
/** @attribute DefaultMemberAttribute("Item") */ 
public final class AxisCollection implements ICollection, IEnumerable
DefaultMemberAttribute("Item") 
public final class AxisCollection implements ICollection, IEnumerable

解説

AxisCollection は、クエリによって返される軸を表すために、CellSet によって使用されます。AxisCollection に含まれる各 Axis は、1 つ以上の階層に沿って構成された、適合する組のセットを表します。

ms142135.note(ja-jp,SQL.90).gifメモ :
フィルタ軸は、このコレクションに含まれません。フィルタ軸にアクセスするには、CellSetOlapInfo.AxesInfo.FilterAxes プロパティを参照する必要があります。

継承階層

System.Object
  Microsoft.AnalysisServices.AdomdClient.AxisCollection

使用例

次のサブルーチンでは、CellSet を受け取り、AxisCollection (CellSetAxes プロパティによって表されます) の繰り返し処理を実行し、各軸の情報を表示します。

Public Sub ListAxes(ByRef cellsetToCheck As CellSet)

    ' Check the parameter before performing actions on it.
    If cellsetToCheck Is Nothing Then
        Throw New System.ArgumentNullException("cellsetToCheck")
    Else
        ' Iterate through the axes of the
        ' CellSet object. The Axes property of the 
        ' CellSet object returns a reference to the
        ' AxisCollection object.

        Try
            Dim axisToCheck As Axis

            Debug.WriteLine("Found " & cellsetToCheck.Axes.Count & _
                " axes in cellset:")

            For Each axisToCheck In cellsetToCheck.Axes

                Debug.WriteLine("  Name:  " & _
                    axisToCheck.Name)
            Next
        Catch ex As AdomdConnectionException
            ' The connection could not be opened or was disconnected.
            ' This error can occur at any time, if the provider is 
            ' disconnected from the server.
            Debug.WriteLine(ex)
            Throw ex
        Catch ex As AdomdErrorResponseException
            ' A response is received from a provider which indicates an error.
            Debug.WriteLine(ex)
            Throw ex
        Catch ex As AdomdUnknownResponseException
            ' A response has been returned from the provider that 
            ' was not understood.
            Debug.WriteLine(ex)
            Throw ex
        Catch ex As AdomdCacheExpiredException
            ' A cached version of an ADOMD.NET object is no longer valid.
            ' This error is typically raised when reviewing meta data.
            Debug.WriteLine(ex)
            Throw ex
        Catch ex As AdomdException
            ' Any other error raised by ADOMD.NET.
            Debug.WriteLine(ex)
            Throw ex
        Catch ex As Exception
            ' Any other error.
            Debug.WriteLine(ex)
            Throw ex
        End Try
    End If
End Sub

スレッド セーフ

この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。

プラットフォーム

開発プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

対象プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

参照

関連項目

AxisCollection Members
Microsoft.AnalysisServices.AdomdClient Namespace