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 9176637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:08:58+00:00 2026-06-17T17:08:58+00:00

Please can somebody help me on the above question? I am using SimpleData in

  • 0

Please can somebody help me on the above question? I am using SimpleData in my project and trying to update records as follows but get the error mentioned above.

var releasedHosts = show_crm.tblName.Update(ID: Id, ID: newId);

Error Message:

Named argument ‘ID’ cannot be specified multiple times

Thank you.

Code Snippet

string siteName = ddlDeleteSite.SelectedItem.Text;
if (!siteName.Equals("Unknown-Site") && siteName != null)
        {
            int siteId = Convert.ToInt32(ddlDeleteSite.SelectedValue);
            //Update record to Attach Hostname to selected site by updating it's SiteID and remove it from 'Unknown-Site'
            var updatedSite = show_crm.tblSites.UpdateBySiteID(SiteID: siteId, Deleted: true);
            if (updatedSite != null)
            {
                var unknownSite = show_crm.tblSites.FindBySiteName("Unknown-Site");
                int unknownSiteId = unknownSite.SiteID;
                var releasedHosts = show_crm.tblHostNames.Update(new { SiteID = unknownSiteId }, new { SiteID = siteId });//(show_crm.tblHostNames.SiteID == siteId, SiteID: unknownSiteId);
            }
            lblDeleteSiteStatus.Text = ddlDeleteSite.SelectedItem.Text + " deleted successfully.";
            lblDeleteSiteStatus.Visible = true;
            RetrieveSites(ddlDeleteSite);

        }
  • 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-06-17T17:09:00+00:00Added an answer on June 17, 2026 at 5:09 pm

    When you want to use a column as criteria and update it, you have to use either the criteria overload of update:

    show_crm.tblName.UpdateAll(show_crm.tblName.ID == Id, ID: newId);
    

    or you can specify two objects as the criteria to do an optimistic-concurrency type of this:

    show_crm.tblName.Update(new {ID = newId}, new {ID = Id});
    

    In the latter form, the first object contains the new values and the second one the “original” values.

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

Sidebar

Related Questions

Can somebody please help me with this mail script. I'm simply trying to send
Can somebody please help me with these questions about using the jquery blockui plugin
Please somebody can help me with my error, there is nothing on console, but
i get an strange error invalid quantifer ... can somebody help me please? html
Can somebody please help me with the if statement and arrays. So for example
Can somebody please help me, I want to put the OK symbol throw HTML
Can somebody please tell me how I can get google analytics on every page
Can somebody help me? please i really need to parse at least google. i
I want to replace the second line file content, can somebody help please based
I can't get the codes right. Can somebody help? #include<stdio.h> int main() { int

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.