If you execute an SPQuery through the SPList.GetItems(SPQuery) method and get all the items in the list, check the syntax in the Query property. The U2U CAML Query adds the tag <Query> to the query and it is not necessary in the Query property of SPQuery. For example:
SPList list = new
SPSite("http://MySharePointSite").OpenWeb().Lists[listName];
SPQuery query = new
SPQuery();
query.Query = "<Query><Where><Eq><FieldRef Name="Title" /><Value Type="Text">Test</Value></Eq></Where></Query>";
SPListItemCollection items = list.GetItems(query);
This code returns all items in the list, but if you remove the <Query> tag all works fine:
SPList list = new
SPSite("http://MySharePointSite").OpenWeb().Lists[listName];
SPQuery query = new
SPQuery();
query.Query = "<Query><Where><Eq><FieldRef Name="Title" /><Value Type="Text">Test</Value></Eq></Where></Query>";
SPListItemCollection items = list.GetItems(query);
Related Links:
http://joeshepherd.spaces.live.com/Blog/cns!9AE2097A4A610B63!123.entry