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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:06:29+00:00 2026-05-20T00:06:29+00:00

I cannot understand the mistake. error None, but no records get inserted. nothing happens.

  • 0

I cannot understand the mistake.

error

None, but no records get inserted. nothing happens.

mysteries

The insert method in the service “mysteries” inserts everything but not which I ask it to.

For the customerid value it keeps on inserting numbers 30118 – 30119 and so on in every insert, irrespective of what I ask it to insert

xaml.cs

 /// </summary>
        public About()
        {
            InitializeComponent();

            this.Title = ApplicationStrings.AboutPageTitle;


            ServiceReference1.Customer new_customer = new ServiceReference1.Customer();
            //feeding data to the instance
            new_customer.CustomerID = 9999999;
            new_customer.NameStyle = false;
            new_customer.FirstName = "first_name";
            new_customer.LastName = "last_name";
            new_customer.PasswordHash = "password_hash";
            new_customer.PasswordSalt = "pass_salt";
            new_customer.rowguid = System.Guid.NewGuid();
            new_customer.ModifiedDate = System.DateTime.Now.Date;

            ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();

            client.DoInsertCompleted += new System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_DoInsertCompleted);

            client.DoInsertAsync(new_customer);
        }

        void client_DoInsertCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
        {
            //throw new System.NotImplementedException();
            label1.Content = "Inserted";
        }

svc.cs

namespace BusinessApplication2.Web
{
    [ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class Service1
    {
        [OperationContract]
        public List<Customer> DoWork()
        {
            // Add your operation implementation here

            BusinessApplication2.Web.AdventureWorksLTEntities alpha = new AdventureWorksLTEntities();

            var selected_rows = from rows in alpha.Customers select rows;

            return selected_rows.ToList();
        }



        [OperationContract]
        public void DoInsert(Customer alpha)
        {

            //create db object
            BusinessApplication2.Web.AdventureWorksLTEntities db = new AdventureWorksLTEntities();
            //create a new table object
            Customer new_customer = new Customer();

            new_customer.CustomerID = alpha.CustomerID;
            new_customer.NameStyle = alpha.NameStyle;
            new_customer.FirstName = alpha.FirstName;
            new_customer.LastName = alpha.LastName;
            new_customer.PasswordHash = alpha.PasswordHash;
            new_customer.PasswordSalt = alpha.PasswordSalt;
            new_customer.rowguid = alpha.rowguid;
            new_customer.ModifiedDate = alpha.ModifiedDate;

            db.Customers.AddObject(new_customer);
            db.AcceptAllChanges();
            db.SaveChanges();
            db.Dispose();

            return;


        }//insert to customer ends
    }
}
  • 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-20T00:06:30+00:00Added an answer on May 20, 2026 at 12:06 am

    Are you certain that you do not have IdentityInsert turned off?

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

Sidebar

Related Questions

Maybe it's just me, but I cannot understand the documentation regarding Junit test integration
I can map 1:1 (one-to-one) tables intuitively, like this: But I cannot understand how
I try to understand where is my mistake, and I cannot find it: this
I cannot understand the Oracle documentation. :-( Does anybody know how to fetch multiple
I cannot understand how this is possible. Please help!! I have an app with
The question is simple: I cannot understand the Zipper data structure. My question is
I noticed that there is one change about ASP.NET Routing. I cannot understand why
I read the SDK document, but can not understand some details, need some help.
I cannot get a two-way bind in WPF to work. I have a string
I cannot understand the calculation 66 ⊕ fa = 9c. The sum is clearly

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.