Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / February 2005



Tip: Looking for answers? Try searching our database.

How to tell if dataset is modified

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
StressPuppy - 28 Feb 2005 01:11 GMT
I have a form with a tab control on it. When the user changes from one tab to
the next, I want be able to check and see if there are any changes on that
tab and prompt them to save or cancel.

Each tab contains data from different tables, all in the same dataset. All
the text fields on the tab are bound to the dataset.

if I use MyDataset.HasChanges, it shows False even if I have modified a
field. What am I missing?  My guess is I have to do something with
BindingContext or the like. Newbie to ADO and .NET, so any help would be
greatly appreciated.
William (Bill) Vaughn - 28 Feb 2005 02:50 GMT
When you bind a control to a DataTable or DataView you need to tell ADO.NET
that you're done with the changes. Check out EndEdit. Once you execute this
method, HasChanges should change state.

Signature

____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

>I have a form with a tab control on it. When the user changes from one tab
>to
[quoted text clipped - 8 lines]
> BindingContext or the like. Newbie to ADO and .NET, so any help would be
> greatly appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.