共用方式為


AdomdConnection.SessionID 屬性

Gets or sets the string identifier of the session that the AdomdConnection opened with the server.

命名空間:  Microsoft.AnalysisServices.AdomdClient
組件:  Microsoft.AnalysisServices.AdomdClient (在 Microsoft.AnalysisServices.AdomdClient.dll 中)

語法

'宣告
Public Property SessionID As String 
    Get 
    Set
'用途
Dim instance As AdomdConnection 
Dim value As String 

value = instance.SessionID

instance.SessionID = value
public string SessionID { get; set; }
public:
property String^ SessionID {
    String^ get ();
    void set (String^ value);
}
member SessionID : string with get, set
function get SessionID () : String 
function set SessionID (value : String)

屬性值

型別:System.String
A string that contains a string identifier that represents the unique ID of a session.

例外狀況

例外狀況 條件
System.InvalidOperationException

The session ID was set after the connection was opened.

備註

The value of this property can only be set before the connection is opened.

Each session has a unique ID for connection purposes. You can use this property, along with the Open and Close methods, to pool sessions. Because an AdomdConnection can be destroyed without destroying the session, the session ID can be used to maintain state by reconnecting to a specific active session.

請參閱

參考

AdomdConnection 類別

Microsoft.AnalysisServices.AdomdClient 命名空間