取caml查询结果的前多少行
取查询结果的前多少行的方法?spQuery.RowLimit = 1;
SPList list = SPContext.Current.Web.Lists[ListNames.CompanyPublicityVideo];
SPQuery spQuery = new SPQuery();
spQuery.Query = string.Format(@"
<Where>
<Eq>
<FieldRef Name='ID' />
<Value Type='Counter'>" + ID + @"</Value>
</Eq>
</Where>");
spQuery.ViewAttributes = "scope='Recursive'";
spQuery.ViewFields = @"<FieldRef Name='ID'/>
<FieldRef Name='VideoPath' />";
spQuery.RowLimit = 1;
SPListItemCollection items = list.GetItems(spQuery);