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

  • Home
  • SEARCH
  • 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 8502415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:28:45+00:00 2026-06-11T01:28:45+00:00

I am using a LINQ to SQL datacontext which has a Sample entity and

  • 0

I am using a LINQ to SQL datacontext which has a Sample entity and the Sample entity has a child entityset, Drums. I have written this code in the Sample partial class to handle adding new drums:

Partial Class Sample

Public Sub New(ByVal limsNumber As String, ByVal lotNumber As String, ByVal createDate As Date)
    Me.New()
    Me.LIMSNum = limsNumber
    Me.LotNum = lotNumber
    Me.DateReceived = createDate

End Sub

Public Sub AddDrum()
    Me.Drums.Add(New Drum With {.DrumNum = Me.Drums.Count + 1})
End Sub

Public Sub AddDrum(ByVal palletNum As Integer, ByVal grossWeight As Integer, ByVal tareWeight As Integer)
    AddDrum(New Drum With {.GrossWeight = grossWeight, .TareWeight = tareWeight, .PalletNum = palletNum})
End Sub

Public Sub AddDrum(ByVal thisDrum As Drum)
    If Me.Drums Is Nothing OrElse Me.Drums.Count = 0 Then
        thisDrum.DrumNum = 1
    Else
        thisDrum.DrumNum = Me.Drums.Max(Function(d) CInt(d.DrumNum)) + 1
    End If
    thisDrum.DateEntered = Now
    Me.Drums.Add(thisDrum)
End Sub

In a WinForm, I have SampleBindingSource and DrumsBindingSource, which has SampleBindingSource as its datasource and “Drums” as its DataMember. If I call the second AddDrum overload, the Drums entityset in the instance of Sample increments by one, as does the Drums member of SampleBindingSource. However, this change does not occur in the DrumsBindingSource.

I have tried ResetBindings(false and true) and EndEdit for both SampleBindingSource and DrumsBindingSource. Nothing seems to cause the changes to occur in the DrumsBindingSource.

How can I solve this problem?

  • 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-11T01:28:46+00:00Added an answer on June 11, 2026 at 1:28 am

    I posted an answer to a similar problem I had at a later date:

    Child bindingsource bound to child entityset does not update

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

Sidebar

Related Questions

I'm working in Visual Studio 2010 using linq-to-sql's DataContext which has several maps to
I'm using Linq to SQL. I have a DataContext against which I am .SubmitChanges()'ing.
I have a particular scenario where I wrote my code using LINQ-SQL but I
I have a very simple application which currently has a single Linq to Sql
I'm using LINQ to SQL and I have a stored procedure which brings back
I have started using Linq to SQL in a (bit DDD like) system which
When using DataContext.CreateDatabase() to create a database, I wish to stop Linq To Sql
I´m using linq to sql and I have a lot of tables with foreign
I have been using Linq to SQL for a while now on one of
I have started using Linq to SQL for a project im working on and

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.