次の方法で共有


SharepointListAdapterObject インターフェイス

SharePoint リストまたはドキュメント ライブラリへの接続を表します。

 

名前空間: Microsoft.Office.Interop.InfoPath.SemiTrust
アセンブリ: Microsoft.Office.Interop.InfoPath.SemiTrust (microsoft.office.interop.infopath.semitrust.dll 内)

構文

'宣言
<CoClassAttribute(GetType(SharepointListAdapterObjectWrapper))> _
<CLSCompliantAttribute(False)> _
<GuidAttribute("096cd69a-0786-11d1-95fa-0080c78ee3bb")> _
Public Interface SharepointListAdapterObject
    Inherits SharepointListAdapter
'使用
Dim instance As SharepointListAdapterObject
[CoClassAttribute(typeof(SharepointListAdapterObjectWrapper))] 
[CLSCompliantAttribute(false)] 
[GuidAttribute("096cd69a-0786-11d1-95fa-0080c78ee3bb")] 
public interface SharepointListAdapterObject : SharepointListAdapter

コメント

この型は、COM 相互運用のためにマネージ コードで必要とされるコクラスのラッパーです。この型を使用して、このコクラスによって実装される COM インターフェイスのメンバにアクセスします。COM インターフェイスについては (このメンバの説明へのリンクを含む)、次を参照してください SharepointListAdapter

SharepointListAdapter インターフェイスのメンバを使用すると、InfoPath 2003 との互換性が提供されます。Microsoft Office InfoPath 2007 で SharepointListAdapter2 オブジェクト モデルに追加された新しいメンバを使用するには、オブジェクトで返されるオブジェクトを、SharepointListAdapter2 型にキャストする必要があります。詳細については、「[方法] InfoPath 2003 と互換性のない Microsoft.Office.Interop.InfoPath.SemiTrust のメンバを使用する方法」を参照してください。

SharePointListAdapter オブジェクトは、SharePoint リストまたはドキュメント ライブラリからデータを取得するための Microsoft Office InfoPath 2007 データ アダプタを表します。

セカンダリ データ ソースとしては、DataSourceObject オブジェクトの QueryAdapter プロパティを介して SharePointListAdapter オブジェクトを使用できます。データ アダプタ オブジェクトは、XDocument オブジェクトの DataAdapters プロパティを介して使用することができます。

SharepointListAdapter SPList = ((SharepointListAdapter)thisXDocument.DataAdapters[“SharePoint list”]);
thisXDocument.UI.Alert(SPList.SiteUrl);
SPList.Query();

次の例では、SharePointListAdapter オブジェクトへの参照は、データ アダプタ オブジェクトの名前を DataAdaptersCollection コレクションの Item プロパティに渡して、データ アダプタ オブジェクトの QueryAdapter プロパティを介してアクセスします。

SharepointListAdapter adapter;
adapter = (SharepointListAdapter) thisXDocument.DataAdapters["Announcements"];

参照を設定した後は、次の例に示すように、SharePointListAdapter オブジェクトのメソッドを使用することができます。これらのメソッドは、SharePoint リストやライブラリを再クエリして、データ アダプタ オブジェクトの DOM プロパティを更新します。

adapter.Query();

関連項目

参照

SharepointListAdapterObject のメンバ
Microsoft.Office.Interop.InfoPath.SemiTrust 名前空間