update

Status
Not open for further replies.

wayko

Active member
Joined
Nov 4, 2002
Messages
27
i have a sqlserver 2000 i want to update one of its field

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

dsArticle1.UpdateCommand.Parameters("@Content").Value = txtContent.Text
dsArticle1.Fill(dsArticle)
DataBind()
End Sub

but when i click on the button i get an error

Server Error in /WebMag1 Application.
--------------------------------------------------------------------------------

Prepared statement (@ArticleNo int,@SubArticleNo int,@VolNo int,@issueNo int)SELECT expects parameter @ArticleNo, which was not supplied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Prepared statement (@ArticleNo int,@SubArticleNo int,@VolNo int,@issueNo int)SELECT expects parameter @ArticleNo, which was not supplied.

Source Error:


Line 115:
Line 116: dsArticle1.UpdateCommand.Parameters("@Content").Value = txtContent.Text
Line 117: dsArticle1.Fill(dsArticle)
Line 118: DataBind()
Line 119: End Sub


Source File: C:\Inetpub\wwwroot\WebMag1\WebForm1.aspx.vb Line: 117

Stack Trace:


[SqlException: Prepared statement (@ArticleNo int,@SubArticleNo int,@VolNo int,@issueNo int)SELECT expects parameter @ArticleNo, which was not supplied.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
WebMag1.WebForm1.Button2_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\WebMag1\WebForm1.aspx.vb:117
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0
 
Status
Not open for further replies.
Back
Top