Edytuj

Udostępnij za pośrednictwem


SharepointListAdapter2.Query Method

Definition

Reads data from the associated data adapter.

public:
 void Query();
public void Query ();
abstract member Query : unit -> unit
Public Sub Query ()

Implements

Examples

In the following example, the Query method of an existing Data Connection to a SharePoint list named "SharePoint list" is invoked. A message box is displayed if the Query method fails:

SharepointListAdapter SPList = ((SharepointListAdapter)thisXDocument.DataAdapters[“SharePoint list”]);
try
{
 SPList.<span class="label">Query</span>();
}
catch (Exception ex)
{
 thisXDocument.UI.Alert("Failed to query.\n\n" + ex.Message);
}

Remarks

The Query method fails if the QueryAllowed property is false.

Applies to