SharepointListAdapter2.Query Method
Reads data from the associated data adapter.
Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Syntax
'Declaration
Sub Query
'Usage
Dim instance As SharepointListAdapter2
instance.Query()
void Query()
Implements
Remarks
The Query method fails if the QueryAllowed property is false.
Important
This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.
Examples
In the following example, the Query method of an existing Data Connection to a SharePoint list, "SharePoint list", is invoked. A message box is displayed if the Query method fails:
SharepointListAdapter SPList = ((SharepointListAdapter)thisXDocument.DataAdapters["SharePoint list"]);
try
{
SPList.Query();
}
catch (Exception ex)
{
thisXDocument.UI.Alert("Failed to query.\n\n" + ex.Message);
}
See Also
Reference
SharepointListAdapter2 Interface