אם אתה מנסה לעדכן את הקובץ XML InfoPath באמצעות מודל האובייקטים של אירועים / WebParts או דרך כלשהי בינוני.
בעוד execting Item.Update() תגרום מתחת שגיאה. בעת עדכון קובץ XML InfoPath ב ListItem
הקובץ ListItem האובייקט מקבל מנותקים.
Item.File.Update() יפתור את הבעיה.
StackTrace של שגיאה:
[COMException (0x81020037): הקובץ SampleFile/SampleFile_2009-06-11T18_57_00.xml שונתה על ידי מערכת SharePoint ב 13 יוני 2009 00:25:30 +0530.] Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(מחרוזת bstrUrl, מחרוזת bstrListName, בוליאני Badd, בוליאני bSystemUpdate, בוליאני bPreserveItemVersion, בוליאני bUpdateNoVersion, Int32& plID, מיתר& pbstrGuid, Guid pbstrNewDocId, בוליאני bHasNewDocId, מחרוזת bstrVersion, חפץ& pvarAttachmentNames, חפץ& pvarAttachmentContents, חפץ& pvarProperties, בוליאני bCheckOut, בוליאני bCheckin, בוליאני bMigration, בוליאני bPublish) +0 Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(מחרוזת bstrUrl, מחרוזת bstrListName, בוליאני Badd, בוליאני bSystemUpdate, בוליאני bPreserveItemVersion, בוליאני bUpdateNoVersion, Int32& plID, מיתר& pbstrGuid, Guid pbstrNewDocId, בוליאני bHasNewDocId, מחרוזת bstrVersion, חפץ& pvarAttachmentNames, חפץ& pvarAttachmentContents, חפץ& pvarProperties, בוליאני bCheckOut, בוליאני bCheckin, בוליאני bMigration, בוליאני bPublish) +203
[SPException: הקובץ SampleFile/SampleFile_2009-06-11T18_57_00.xml שונתה על ידי מערכת SharePoint ב 13 יוני 2009 00:25:30 +0530.] Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(מחרוזת bstrUrl, מחרוזת bstrListName, בוליאני Badd, בוליאני bSystemUpdate, בוליאני bPreserveItemVersion, בוליאני bUpdateNoVersion, Int32& plID, מיתר& pbstrGuid, Guid pbstrNewDocId, בוליאני bHasNewDocId, מחרוזת bstrVersion, חפץ& pvarAttachmentNames, חפץ& pvarAttachmentContents, חפץ& pvarProperties, בוליאני bCheckOut, בוליאני bCheckin, בוליאני bMigration, בוליאני bPublish) +251 Microsoft.SharePoint.SPListItem.AddOrUpdateItem(בוליאני Badd, בוליאני bSystem, בוליאני bPreserveItemVersion, בוליאני bNoVersion, בוליאני bMigration, בוליאני bPublish, בוליאני bCheckOut, בוליאני bCheckin, Guid newGuidOnAdd, Int32& ulID, חפץ& objAttachmentNames, חפץ& objAttachmentContents, בוליאני suppressAfterEvents) +1026 Microsoft.SharePoint.SPListItem.UpdateInternal(בוליאני bSystem, בוליאני bPreserveItemVersion, Guid newGuidOnAdd, בוליאני bMigration, בוליאני bPublish, בוליאני bNoVersion, בוליאני bCheckOut, בוליאני bCheckin, בוליאני suppressAfterEvents) +182 Microsoft.SharePoint.SPListItem.SystemUpdate() +97 Peoples.WebControls.<>c__DisplayClass1.<ExportData>b__0() +993 Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(אובייקט המדינה) +70 Microsoft.SharePoint.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2() +392 Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated SecureCode) +152 Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(לחכות SecureCode איתות, האובייקט פרמטר) +345 Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated SecureCode) +86 Peoples.WebControls.CalendarExport.ExportData() +320 Peoples.WebControls.CalendarExport.ExportCalendar_Click(אובייקט השולח, EventArgs אלקטרוני) +40 System.Web.UI.WebControls.Button.OnClick(EventArgs אלקטרוני) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(מחרוזת eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(מחרוזת eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, מחרוזת eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(בוליאני includeStagesBeforeAsyncPoint, בוליאני includeStagesAfterAsyncPoint) +1565 |
תודה על פרסום זה!
http://www.mstechblogs.com הוא מאוד אינפורמטיבי. המאמר כתוב מאוד מקצועית. אני נהנית לקרוא http://www.mstechblogs.com כל יום.
תודה חבר!
כן – תודה על זה. אני צריך להשתמש בזה המלכוד של לנסות / לתפוס – נסה מכילה Item.Update(). נראה לי לפתור בעיה זו starnge. האם זה בעיה ספוראדית אז?
Thanks.It עוזר לי….