SharePoint : The difference and relation between SPListItem.Update and SPListItem.SystemUpdate Methods 【转载】

http://www.nanmu.net/keli/blog/Lists/Posts/Post.aspx?ID=93

    You may have used SPListItem.Update() method in sharepoint development, but you may don't know about SPListItem.SystemUpdate() method. Now we talk about the difference and relation about them.

    First, let's see the SDK's description:

  • SPListItem.Update(), Updates the database with changes that are made to the list item.

  • SPListItem.SystemUpdate(),Updates the database with changes made to the list item, without effecting changes in the Modified or Modified By fields.

  • SPListItem.SystemUpdate(bool incrementListItemVersion),Updates the database with changes that are made to the list item, without effecting changes in the Modified Time or Modified By fields, or optionally, the item version.

    Now we can see, the same appointment is they are save the item changes to database. But, the Update method will effectint the modified time and Modified By Fields, the systemupdate method will not.

 

这是一个不怎么起眼的技术细节,SPListItem.SystemUpdate会保存更改,但不会保存更改时间,以及修改人。

posted @ 2009-11-08 18:12  陈希章  阅读(482)  评论(0编辑  收藏  举报