ISPWDataConnector.Query Method

Queries a table in the underlying data and returns a DataSet with all records matching the query.

Namespace:  Microsoft.Office.SharePointWorkspace.AddIn
Assembly:  Microsoft.Office.SharePointWorkspace.AddIn.Interface (in Microsoft.Office.SharePointWorkspace.AddIn.Interface.dll)


Function Query ( _
    xml As String _
) As DataSet
Dim instance As ISPWDataConnector
Dim xml As String
Dim returnValue As DataSet

returnValue = instance.Query(xml)
DataSet Query(
    string xml


Return Value

Type: System.Data.DataSet
DataSet containing the records that matched the query.


The XML schema for the Query element is defined in:

C:\Program Files\Microsoft Office\Office14\Groove\XML Files\spwaddin.xsd

if you have installed SharePoint Workspace in the default location.

The following is a sample XML query string:

<?xml version="1.0" encoding="utf-8"?>
<Query Name="Table1Query" TableRef="Table1" xmlns="">
    <ColumnRef Name="Column1" />
    <ColumnRef Name="Column2" />
      <ColumnRef Name="Column2" />
    <ColumnRef Name="Column2" Ascending="True" />

The query Name determines the name of the returned DataSet. The query TableRef specifies the table to query.

See Also


ISPWDataConnector Interface

ISPWDataConnector Members

Microsoft.Office.SharePointWorkspace.AddIn Namespace