Share via

web part eror

sns 9,251 Reputation points
2020-08-04T10:47:07.137+00:00

After entering details and submitting the item getting below error.

15468-capture.png

I have captured the ULS logs from the help of above correlation id.
What could be the cause please help

Microsoft.SharePoint.WebPartPages.DataFormWebPartException: The data source control failed to execute the insert command. a6a8c27f-c03d-4387-9b4c-73a3fca0a4bb
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.InsertCallback(Int32 affectedRecords, Exception ex)
at System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback)
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.FlatCommit()
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.HandleOnSave(Object sender, EventArgs e)
at Microsoft.SharePoint.WebControls.SaveButton.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I used ?contents=1 at the end of the url showing below web part,
15543-listofwebparts.png

Microsoft 365 and Office | SharePoint Server | For business
0 comments No comments

Answer accepted by question author

MichaelHan-MSFT 18,136 Reputation points
2020-08-05T06:51:05.267+00:00

Hi, @sns ,

I find a similar issue in this thread, you could this way. It may work for you. data-source-control-failed-to-execute-the-insert-command

Open your page with SharePoint Designer, change the code in this form web part:

<SharePoint:SPDataSource runat="server" DataSourceMode="List"  
  
To  
  
<SharePoint:SPDataSource runat="server" DataSourceMode="ListItem"  

Reference:

https://eric.oszakiewski.net/the-data-source-control-failed-to-execute-the-insert-command/

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.