SharepointListQueryConnection クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
注意事項
The SharePointListQueryConnection class has been deprecated. Use SharePointListRWQueryConnection instead.
SharePoint リストまたはドキュメント ライブラリからデータを取得するためのデータ接続を表します。
public ref class SharepointListQueryConnection abstract : Microsoft::Office::InfoPath::DataConnection
[System.Obsolete("The SharePointListQueryConnection class has been deprecated. Use SharePointListRWQueryConnection instead.")]
public abstract class SharepointListQueryConnection : Microsoft.Office.InfoPath.DataConnection
type SharepointListQueryConnection = class
inherit DataConnection
Public MustInherit Class SharepointListQueryConnection
Inherits DataConnection
- 継承
- 属性
例
次の例では、SharePoint 上の連絡先情報の一覧に接続する "Contacts" という名前の接続を表す SharePointListQueryConnection オブジェクトへの参照を設定します。その名前を DataConnectionCollection クラスの Item[String] プロパティに渡し、返されたオブジェクトを SharePointListQueryConnection 型にキャストします。
[C#]
SharePointListQueryConnection spConnection = (SharePointListQueryConnection)this.DataConnections["Contacts"];
Dim spConnection As SharePointListQueryConnection = _
DirectCast(Me.DataConnections("Contacts"), _
SharePointListQueryConnection)
参照が設定された後は、SharePointListQueryConnection オブジェクトのプロパティやメソッドを使用できます。 次の例では、DataConnection 基底クラスから継承された Name プロパティによって返される値に文字列変数を設定します。
string spName = spConnection.Name;
Dim spName As String = spConnection.Name
注釈
重要: SharepointListQueryConnection クラスとそのメンバーは、Microsoft InfoPath で非推奨になりました。 このクラスのメンバーと共に記述されたコードは、InfoPath 2003 または InfoPath 2007 で作成された SharePoint ドキュメント ライブラリへのデータ接続、InfoPath 2007 フォーム テンプレートのいずれかで InfoPath で作成された新しいフォーム テンプレート内のデータ接続、または [データ Connections] ダイアログ ボックスの [以前のバージョンに変換されたデータ接続] ボタンとの互換性があります。 InfoPath フォーム テンプレートで作成された SharePoint ドキュメント ライブラリへのデータ接続で動作するコードを記述するには、 SharePointListRWQueryConnection クラスのメンバーを使用します。 さらに、[データ Connections] ダイアログ ボックスの [現在のバージョンに変換] ボタンを使用してデータ接続を SharePoint ドキュメント ライブラリに変換する場合は、代わりに SharePointListRWQueryConnection クラスのメンバーを使用するために、SharepointListQueryConnection クラスのメンバーで記述されたコードを書き直す必要があります。
SharePointListQueryConnection オブジェクトは、データ接続ウィザードを使用して InfoPath で作成されたセカンダリ データ接続を表し、SharePoint リストまたはドキュメント ライブラリからデータを取得するために必要なすべての情報を指定します。
SharePointListQueryConnection クラスが提供するプロパティを使用すると、データ接続の名前や、接続がデータを取得してくる Windows SharePoint Services サイト上のリストまたはドキュメント ライブラリの URL (Uniform Resource Locator) を取得することができます。
データ接続に関連付けられている SharePointListQueryConnection オブジェクトには、XmlForm クラスの DataConnections プロパティを使用してアクセスし、フォーム テンプレートのDataConnectionCollectionから接続を返します。
DataConnection 基本クラスから継承された既定のExecute() メソッドは、InfoPath フォーム テンプレート デザイン モードで宣言的に定義された値を使用してクエリまたは送信操作を実行します。 さらに、 SharePointListQueryConnection クラスには Execute(XPathNavigator) メソッドが用意されています。これにより、返されるデータを挿入する別の場所を指定できます。
SharePointListQueryConnection クラスは、Microsoft Office InfoPath 2003 オブジェクト モデルの SharePointListAdapterObject インターフェイスに対応しています。
コンストラクター
| SharepointListQueryConnection() |
古い.
SharePoint リストまたはドキュメント ライブラリからデータを取得するためのデータ接続を表します。 |
プロパティ
| Name |
古い.
データ接続の名前を取得します。 (継承元 DataConnection) |
| QueryThisFormOnly |
古い.
クエリ操作が現在のフォームにのみ適用されるかどうかを取得します。 |
| SiteUrl |
古い.
SharepointListQueryConnection オブジェクトに関連付けられているWindows SharePoint Services サイトの Uniform Resource Locator (URL) を表す System.Uri オブジェクトを取得します。 |
メソッド
| Execute() |
古い.
どの ConnectionTypeConnection クラスから呼び出されたかに応じて、送信されるデータ、クエリ パラメーター、または取得するデータに対して宣言的に定義された値を使用して、データ接続で送信操作またはクエリ操作を実行します。 (継承元 DataConnection) |
| Execute(XPathNavigator) |
古い.
返されるデータを挿入する別の場所を指定できるように、既定の Execute() メソッドをオーバーライドします。 |