Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

SPSiteDataQuery

$
0
0

 I have two custom lists(list A, List B) under a site.. i am trying to get the vaue of "Status" which is in list A and "Application" in List B when the value of Created by is "BETTA" in both the cases...

"The property Query contains an invalid value." -----> i am getting this exception..

SPSiteDataQuery oQuery = new SPSiteDataQuery();
                    oQuery.Webs = "<Webs Scope=\"Recursive\">"; 
                    oQuery.Lists = "<Lists ServerTemplate=’107’ Hidden=’TRUE’/>";
                    oQuery.ViewFields = "<FieldRef Name=\"Status\" /><FieldRef Name=\"Application\" />";
                    string where = @"<Query><Where><Eq><FieldRef Name='Author'/><Value Type='Text'>BETTA</Value></Eq></Where></Query>";
                    oQuery.Query = where;
                    DataTable dataTable = oWeb.GetSiteData(oQuery);


Viewing all articles
Browse latest Browse all 17574

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>