使用caml查询从列表中获取最新项目 [英] Get latest item from list using caml query

查看:73
本文介绍了使用caml查询从列表中获取最新项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有什么方法可以使用caml查询获取共享点列表项?

谢谢,

gaurav



is there any way that we can get sharepoint list item using caml query?

thanks,

gaurav

推荐答案

有很多方法可以做到这一点. CAML是SharePoint查询的中坚力量.
如果您提供有关问题的更多详细信息,也许可以给出更具体的答案.
There are numerous ways to do this. CAML is the backbone of SharePoint queries.
If you give more details about your issue perhaps a more specific answer can be given.




我错过了整个查询.

这就是我实现它的方式

SPQuery _query =新的SPQuery();
_query.Query ="


i missed the whole query.

this is how i implemented it

SPQuery _query = new SPQuery();
_query.Query = "
<OrderBy>
   <FieldRef Name='Created' Ascending='False' />
</OrderBy>

;
_query.RowLimit = 1;

谢谢,

Gaurav

";
_query.RowLimit = 1;

thanks,

Gaurav


SPQuery _query = new SPQuery();
_query.Query =< orderby>< fieldref name =" ID"ascending =" False>";
_query.RowLimit = 1;



我通过上面的代码得到了解决方案

谢谢,

gaurav
SPQuery _query = new SPQuery();
_query.Query = "<orderby><fieldref name="ID" ascending="False">";
_query.RowLimit = 1;



i got my solution through above code

thanks,

gaurav


这篇关于使用caml查询从列表中获取最新项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆