Nếu bạn cố gắng cập nhật các file xml InfoPath thông qua mô hình đối tượng trong các sự kiện / WebParts hoặc thông qua bất kỳ phương tiện.
Trong khi execting các Item.Update() sẽ gây ra lỗi dưới đây. Trong khi cập nhật các file xml trong ListItem InfoPath
các tập tin và ListItem đối tượng nhận được ngắt kết nối.
Item.File.Update() sẽ giải quyết vấn đề của bạn.
StackTrace của Lỗi:
[COMException (0x81020037): Các SampleFile/SampleFile_2009-06-11T18_57_00.xml tập tin đã được sửa đổi bởi hệ thống SHAREPOINT trên 13 Tháng Sáu 2009 00:25:30 +0530.] Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, Chuỗi& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Đối tượng& pvarAttachmentNames, Đối tượng& pvarAttachmentContents, Đối tượng& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +0 Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, Chuỗi& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Đối tượng& pvarAttachmentNames, Đối tượng& pvarAttachmentContents, Đối tượng& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +203
[SPException: Các SampleFile/SampleFile_2009-06-11T18_57_00.xml tập tin đã được sửa đổi bởi hệ thống SHAREPOINT trên 13 Tháng Sáu 2009 00:25:30 +0530.] Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, Chuỗi& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Đối tượng& pvarAttachmentNames, Đối tượng& pvarAttachmentContents, Đối tượng& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +251 Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Đối tượng& objAttachmentNames, Đối tượng& objAttachmentContents, Boolean suppressAfterEvents) +1026 Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents) +182 Microsoft.SharePoint.SPListItem.SystemUpdate() +97 Peoples.WebControls.<>c__DisplayClass1.<ExportData>b__0() +993 Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Đối tượng nhà nước) +70 Microsoft.SharePoint.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2() +392 Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated SecureCode) +152 Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(chờ gọi lại SecureCode, Đối tượng tham số) +345 Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated SecureCode) +86 Peoples.WebControls.CalendarExport.ExportData() +320 Peoples.WebControls.CalendarExport.ExportCalendar_Click(Đối tượng người gửi, EventArgs e) +40 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 |
Cảm ơn bạn đã gửi bài này!
http://www.mstechblogs.com là rất thông tin. Bài viết rất chuyên nghiệp bằng văn bản. Tôi thích đọc http://www.mstechblogs.com mỗi ngày.
Thanks bạn thân!
Vâng – Cảm ơn cho việc này. Tôi có sử dụng điều này trong sản lượng đánh bắt của try / catch – thử có chứa Item.Update(). Dường như để giải quyết vấn đề này starnge. Có một vấn đề không thường xuyên sau đó?
Thanks.It đang giúp tôi….