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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:33:12+00:00 2026-05-27T18:33:12+00:00

I have the following: var db = new datesDataContext(); var query = from ord

  • 0

I have the following:

    var db = new datesDataContext();
    var query =
    from ord in db.Dates
    where ord.id == id
    select ord;

    foreach (Date ord in query)
    {
        ord.date1 = product.date1;
        ord.name = product.name;
    }
    db.SubmitChanges();

It all runs fine (no errors, etc) except that SubmitChanges is not making the changes in the database.

ord.dat1 and ord.name are definitely being set…

edit: here’s my date class (it says partial but it’s the entire class, no other definition elsewhere):

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Dates")]
public partial class Date
{

    private System.Nullable<int> _id;

    private System.Nullable<System.DateTime> _date1 = DateTime.Now;

    private string _name;

    public Date()
    {
    }

    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_id", DbType="Int")]
    public System.Nullable<int> id
    {
        get
        {
            return this._id;
        }
        set
        {
            if ((this._id != value))
            {
                this._id = value;
            }
        }
    }

    [global::System.Data.Linq.Mapping.ColumnAttribute(Name="date", Storage="_date1", DbType="DateTime")]
    public System.Nullable<System.DateTime> date1
    {
        get
        {
            return this._date1;
        }
        set
        {
            if ((this._date1 != value))
            {
                this._date1 = value;
            }
        }
    }

    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_name", DbType="Text", UpdateCheck=UpdateCheck.Never)]
    public string name
    {
        get
        {
            return this._name;
        }
        set
        {
            if ((this._name != value))
            {
                this._name = value;
            }
        }
    }
}
  • 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-27T18:33:13+00:00Added an answer on May 27, 2026 at 6:33 pm

    Is your Date class implementing INotifyPropertyChanged?

    EDIT: implement INotifyPropertyChanged in your Date class

    public partial class Date : INotifyPropertyChanged
    {
             public event PropertyChangedEventHandler PropertyChanged;
    
             private void NotifyPropertyChanged(String info)
             {
                 if (PropertyChanged != null)
                 {
                     PropertyChanged(this, new PropertyChangedEventArgs(info));
                }
            }
    

    …..rest of class definition

    and in each setter method use this code after changing values

    NotifyPropertyChanged("PropertyName");
    

    PropertyName in your case is id, date1 and name.

    You also need to specify Primary Key otherwise tracking changes will not work.

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

Sidebar

Related Questions

I have the following code: var searcher = new ManagementObjectSearcher(SELECT Name, Path FROM Win32_share);
I have the following variable that accepts a file name: var xtr = new
I have following query: var result = ( from role in db.Roles join user
Imagine you have the following TreeMap: var dates = new TreeMap[Long, Tuple2[Int, Double]]() I
I have the following linq query var result = from myTypes in context.MyTypes where
I have the following arrays: var dates = new Array(); var answers = new
Is this possible? Say you have the following: var x = new { name
Lets say I have the following array in JavaScript: var skins = new Array('Light',
I have an associative array (object) of the following construction var menu = new
when handling data, i always have to write the following: var dataSourceRequest:URLRequest = new

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.