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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:42:18+00:00 2026-06-02T10:42:18+00:00

I am using ADO.NET and trying to update a column value in a table

  • 0

I am using ADO.NET and trying to update a column value in a table in a SQL Server 2008 database. However the value is not updating. Even though it’s update when I debug it in C# code. Here is my code:

using (ADONETClass context = new ADONETClass())
{
   List<Invoices> list = context.Invoices.ToList<Invoices>();
   foreach (Invoices b in list)
   {
      b.status = 0;
   }
}

Now I debugged the code and saw that context.Invoices.ToList<Invoices>()[0].status is indeed set to zero. But when the program finished running, I open the SQL Server Management Studio and status value there was still 0. Not sure what is going on? Am I missing something?

Thanks

Varun

  • 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-02T10:42:20+00:00Added an answer on June 2, 2026 at 10:42 am

    Are you calling context.SaveChanges()?

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

Sidebar

Related Questions

I'm developing an ASP.NET app (C#) that connect to SQL Server 2008 using ADO.NET
I'm trying to generate my entities from my SQL database using the ADO.NET Entity
I'm simply trying to get data from two sql server db tables using ado.net
I am trying update my table from c# ado.net with this function.I am using
how can I by using Ado.net rename existing column in a table and changing
I am trying to generate my ADO.NET entity model from my MySQL database using
General Info: ASP.NET MVC app using ADO.NET Entity Framework SQL Server 2005 I have
I am trying to update a table across non-linked SQL servers using: C# or
I am trying to develop an application using ADO.NET. I have two tables in
I am trying to execute DBCC CHECK DB('MyDB) using ADO.Net, but how can I

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.