Jika anda cuba untuk mengemaskini fail xml InfoPath melalui model objek dalam acara-acara / WebParts atau melalui apa-apa perantara.
Walaupun execting yang Item.Update() akan menyebabkan ralat di bawah. Walaupun mengemaskini fail xml InfoPath dalam ListItem
fail dan objek ListItem mendapat terputus.
Item.File.Update() akan menyelesaikan masalah anda.
Surih tindanan Ralat:
[COMException (0x81020037): Fail SampleFile / SampleFile_2009-06-11T18_57_00.xml telah diubah suai oleh SharePoint sistem pada 13 Jun 2009 00:25:30 +0530.] Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(Rentetan bstrUrl, Rentetan bstrListName, Perisikan Boolean, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, Rentetan& pbstrGuid, GUID pbstrNewDocId, Boolean bHasNewDocId, Rentetan bstrVersion, Objek& pvarAttachmentNames, Objek& pvarAttachmentContents, Objek& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +0 Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(Rentetan bstrUrl, Rentetan bstrListName, Perisikan Boolean, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, Rentetan& pbstrGuid, GUID pbstrNewDocId, Boolean bHasNewDocId, Rentetan bstrVersion, Objek& pvarAttachmentNames, Objek& pvarAttachmentContents, Objek& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +203
[SPException: Fail SampleFile / SampleFile_2009-06-11T18_57_00.xml telah diubah suai oleh SharePoint sistem pada 13 Jun 2009 00:25:30 +0530.] Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(Rentetan bstrUrl, Rentetan bstrListName, Perisikan Boolean, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, Rentetan& pbstrGuid, GUID pbstrNewDocId, Boolean bHasNewDocId, Rentetan bstrVersion, Objek& pvarAttachmentNames, Objek& pvarAttachmentContents, Objek& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish) +251 Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Perisikan Boolean, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, GUID newGuidOnAdd, Int32& ulID, Objek& objAttachmentNames, Objek& objAttachmentContents, SuppressAfterEvents Boolean) +1026 Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, GUID newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, SuppressAfterEvents Boolean) +182 Microsoft.SharePoint.SPListItem.SystemUpdate() +97 Peoples.WebControls.<>c__DisplayClass1.<ExportData>b__0() +993 Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Objek negeri) +70 Microsoft.SharePoint.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2() +392 Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(SecureCode CodeToRunElevated) +152 Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(SecureCode WaitCallback, Param objek) +345 Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(SecureCode CodeToRunElevated) +86 Peoples.WebControls.CalendarExport.ExportData() +320 Peoples.WebControls.CalendarExport.ExportCalendar_Click(Objek penghantar, EventArgs e) +40 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(Rentetan eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(Rentetan eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, Rentetan eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection POSTDATA) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 |
Terima kasih kerana menghantar ini!
http://www.mstechblogs.com adalah sangat bermaklumat. Artikel ini adalah sangat profesional bertulis. Saya menikmati membaca http://www.mstechblogs.com setiap hari.
Terima kasih kawan!
Yep – Terima kasih kerana ini. Saya perlu menggunakan ini dalam tangkapan cuba / tangkapan – cuba mengandungi Item.Update(). Nampaknya untuk menyelesaikan isu ini starnge. Adakah ia satu isu yang berlaku sekali-sekali maka?
Thanks.It membantu saya….