HASCHANGES Method

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
Thank you very much! I added AcceptChanges after the lookup, then
..EndCurrentEdit just before I checked HasChanges. All works as expected. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top