Why isn't dataset.HasChanges changing?

I have textboxes bound with a bindsource to a dataset.  I have typed changes into my textbox, but when I check dataset.HasChanges it is still set at False.

I thought if the dataset changed then the textbox would change as well as vice-versa, if the textbox changes, then the dataset would changes.

So, what do I need to do to ensure that when a textbox.text changes, then the bound dataset also changes?
vlvawterAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SanclerCommented:
Changes made in bound controls are only committed to the dataset when the "current edit" ends.  That happens automatically if the user navigates to another record.  But otherwise you have to call .EndCurrentEdit for the binding manager concerned, before they will be reflected in .HasChanges.

If you have a CurrencyManager (e.g. so that "forward" and "back" buttons will work)

   MyCurrencyManager.EndCurrentEdit

should do it.  If not

   Me.BindingContext(<name of data Source>).EndCurrentEdit

should be OK.  In either case, put it just before your .HasChanges check.

Roger

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vlvawterAuthor Commented:
Roger,

I've done a lot of experimenting, and the ADO flow is making more sense.  I use me.bindingsource.endedit, which produceds the same result as your code.

Thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.