Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 746455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:05:35+00:00 2026-05-14T14:05:35+00:00

I’m completely new to MySql and haven’t used SqlDataSource with UpdateParameters before, so I’m

  • 0

I’m completely new to MySql and haven’t used SqlDataSource with UpdateParameters before, so I’m probably missing something very obvious.

When trying to update a record, the update does happen but then throws an error saying “‘id’ parameter is missing at the statement”. So the query works and the database gets updated as it should, but an error is thrown afterwards.

These are the update parameters:

<UpdateParameters>
                <asp:Parameter Name="business_name" Type="string" Size="256" />
                <asp:Parameter Name="addr_line_1" Type="string" Size="256" />
                <asp:Parameter Name="addr_line_2" Type="string" Size="256" />
                <asp:Parameter Name="addr_line_3" Type="string" Size="256" />
                <asp:Parameter Name="postcode" Type="string" Size="32" />
                <asp:Parameter Name="county" Type="string" Size="128" />
                <asp:Parameter Name="town_city" Type="string" Size="256" />
                <asp:Parameter Name="tl_url" Type="string" Size="256" />
                <asp:Parameter Name="customer_id" Type="string" Size="16" />
                <asp:Parameter Name="region_id" Type="Int16" />
                <asp:Parameter Name="description" Type="string" Size="1024" />
                <asp:Parameter Name="approval_status" Type="string" Size="1" />
                <asp:Parameter Name="tl_user_name" Type="string" Size="256" />
                <asp:Parameter Name="phone"  Type="string" Size="50" />
                <asp:Parameter Name="uploaders_own" Type="Int16" />
            </UpdateParameters>

Here’s the update statement:

UPDATE myTable SET business_name = ?, addr_line_1 = ?, addr_line_2 = ?, addr_line_3 = ?, postcode = ?, county = ?, town_city = ?, tl_url = ?, customer_id = ?, region_id = ?, description = ?, approval_status = ?, tl_user_name = ?, phone = ?, uploaders_own = ? WHERE id = " + id

Here’s the stack trace:

[InvalidOperationException: 'id' parameter is missing at the statement]
   CoreLab.MySql.r.a() +775
   CoreLab.MySql.r.a(Int32& A_0, ArrayList& A_1) +448
   CoreLab.MySql.x.e() +398
   CoreLab.MySql.x.o() +89
   CoreLab.MySql.MySqlCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3) +1306
   CoreLab.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior) +310
   System.Data.Common.DbCommand.ExecuteReader() +12
   CoreLab.Common.DbCommandBase.ExecuteNonQuery() +64
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +386
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +325
   System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +92
   System.Web.UI.WebControls.DetailsView.HandleUpdate(String commandArg, Boolean causesValidation) +837
   System.Web.UI.WebControls.DetailsView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +509
   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 source, EventArgs e) +113
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

Does anyone know what I’m doing wrong?

Thanks,

Annelie

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:05:35+00:00Added an answer on May 14, 2026 at 2:05 pm

    at the very end of your query id parameter mentioned.
    but it doesn’t seem to be defined somewhere

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.