asp.net - Inserting is not supported by data source 'SqlDataSource1' unless InsertCommand is specified -


I'm having a problem,

The problem is that I have created asp.net website I I am using the details view to insert records.

I am using an Access Data Source to connect to the database file. I'm having an error error

server error in the 'WEBSITE3' application

The insert is not supported by the data source 'SqlDataSource1' unless InsertCommand is specified. Description: An uncontrolled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where the code has originated from it.

Exception Details: System.NotSupportedException: inserting data source 'SqlDataSource1' is not supported by the InsertCommand is assigned

Source Error :.

The exception to an unstable action was to generate during the execution of the current web request. The information about the origin and location of the exception can be identified using the exception stack trace below.

Stack trace:

[NotSupportedException:. Insert data source is not supported by 'SqlDataSource1' unless InsertCommand is specified] System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert (IDictionary values) +1967663 System.Web.UI.DataSourceView.Insert (IDictionary values, DataSourceViewOperationCallback callbacks ) 89 System.Web.UI.WebControls.DetailsView.HandleInsert (string commandArg, Boolean causesValidation) 379 System.Web.UI.WebControls.DetailsView .HandleEvent (EventArgs e, Boolean causesValidation, string validationGroup) 574 System.Web.UI.WebControls .DetailsView.OnBubbleEvent (object source, EventArgs e) 95 System.Web.UI.Control.RaiseBubbleEvent (object source, EventArgs args) +37 System.Web.UI.WebControls.DetailsViewRow.OnBubbleEvent (object level Source, EventArgs e) 112 System.Web.UI.Control.RaiseBubbleEvent (object source, EventArgs args) +37 System.Web.UI.WebControls.LinkButton. OnCommand (CommandEventArgs e) +125 system. Web.UI.WebControls.LinkButton.RaisePostBackEv Ent (string Iventargment) +169 system. Web. UI. WebControl Linkbutan Cement Web. UI.IPBlackAventHandler Rise Postback Event (String Event Agreement) +9 Systems Web. UI. Page Rise Postback Event (IFBlackAventHandler Source Control, String Event Agreement) +13 System.Web.UI.Page.RaisePostBackEvent (NameValueCollection postData) +176 System.web.Page.ProcessRequestMain (boolean includes StagesBeforeAsyncPoint, Boolean StagesAfterAsyncPoint) +5563


Version information: Microsoft .NET Framework version: 4.0.30319; ASP.NET version: 4.0.30319.225

Please help me,

thanks in advance

You need to specify the inserted command and the insert parameter for SqlDataSource1 .

This article gives you the control of SQLDatas:



Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -