473,396 Members | 1,765 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

HASCHANGES Method

I've tried to follow the threads regarding using the HASCHANGES method but
still cannot understand how to use it.

Situation is this: single dataset, single table, bound to controls on a
form. table is filled after user enters a lookup value. I want to check
HASCHANGES if EXIT pressed and changes were made but not UPDATE(ed).

Problem is HASCHANGES is always true regardless of whether changes were made
or not. I tried BINDINGCONTEXT.ENDCURRENTEDIT immediately after the ds is
populated but that didn't help.

Any thoughts?

Cliff
Jul 21 '05 #1
2 1369
You must call AcceptChanges() immediately after you load the data. If you use a DataAdapter to "Fill" the data, it will make the
call for you.

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Klatuu" <Kl****@discussions.microsoft.com> wrote in message news:82**********************************@microsof t.com...
I've tried to follow the threads regarding using the HASCHANGES method but
still cannot understand how to use it.

Situation is this: single dataset, single table, bound to controls on a
form. table is filled after user enters a lookup value. I want to check
HASCHANGES if EXIT pressed and changes were made but not UPDATE(ed).

Problem is HASCHANGES is always true regardless of whether changes were made
or not. I tried BINDINGCONTEXT.ENDCURRENTEDIT immediately after the ds is
populated but that didn't help.

Any thoughts?

Cliff

Jul 21 '05 #2
Thank you very much! I added AcceptChanges after the lookup, then
..EndCurrentEdit just before I checked HasChanges. All works as expected. :)

"Dave" wrote:
You must call AcceptChanges() immediately after you load the data. If you use a DataAdapter to "Fill" the data, it will make the
call for you.

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Klatuu" <Kl****@discussions.microsoft.com> wrote in message news:82**********************************@microsof t.com...
I've tried to follow the threads regarding using the HASCHANGES method but
still cannot understand how to use it.

Situation is this: single dataset, single table, bound to controls on a
form. table is filled after user enters a lookup value. I want to check
HASCHANGES if EXIT pressed and changes were made but not UPDATE(ed).

Problem is HASCHANGES is always true regardless of whether changes were made
or not. I tried BINDINGCONTEXT.ENDCURRENTEDIT immediately after the ds is
populated but that didn't help.

Any thoughts?

Cliff


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Graham Blandford | last post by:
Hi all, I'm sure I must be missing something here.. I've created a simple parent - child form appl. in which I open a dataset in the parent (MDI) using a dataadaptor to an Access database, and...
2
by: jbsound | last post by:
I have been banging my head against this one and I'm sure I'm missing something: Got a WinForms app in VB.NET with controls bound to a dataset. For the sake of this discussion, let's use just...
4
by: thead01 | last post by:
I create a dataset, load xmlfile, create dataview (ds.defaultview) and bind it to a datagrid (dataset haschanges property is now 'true'). When a user closes the form I want to check via...
2
by: Klatuu | last post by:
I've tried to follow the threads regarding using the HASCHANGES method but still cannot understand how to use it. Situation is this: single dataset, single table, bound to controls on a form....
5
by: mrstrong | last post by:
Gday, Have been going through the walkthrough for a distributed application: http://msdn2.microsoft.com/en-us/library/1as0t7ff.aspx and it appears to suggest in the SaveData_Click method that...
7
by: darjonase | last post by:
I am having a problem, and I wonder if anyone could help me with it. I have two methods. The first on a form calls the second method which is located in a class lib. 'Form Method Private Sub...
2
by: mikeficklonni | last post by:
Hello, I am very new to C# and .Net. I may be overlooking something very simple here, however, even after reading several forums I'm still stumped. I can't get the HasChanges method to work. ...
4
by: John | last post by:
Hello, I was wondering if it was possibly to bind a control to a dataset.haschanges property. The reason I want to do this is so that a little warning shows up on the form saying that the...
1
nev
by: nev | last post by:
i really checked this over and over and i can conclude that the datatable has no haschanges() method. i would like to use that event to check if my user has modified a record. please guide me...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.