SPSiteDataQuery oSiteQuery = new SPSiteDataQuery();
oSiteQuery.Query = "<Where>" +
" <Gt>" +
" <FieldRef Name="ID" />" +
" <Value Type = "Number"> 100 </Value>" +
" </Gt>" +
"</Where>";
oSiteQuery.ViewFields = "<FieldRef Name="Title" />"
DataTable oQueryResults = SPContext.Current.Web.GetSiteData(oSiteQuery);
oQueryResults.TableName = "queryTable";
oQueryResults.WriteXML("C:\queryTable.xml");
No comments:
Post a Comment