listBox +Update problem
Hi,
I am using project Ch18Ex01 from the C#'s book version 1.
There is an 'Update' button which updates the data in the database, but I have a problem, depending on how I am using it.
I have only changed one thing: display the contact Name instead of the customer ID in the list box.
Here is what I did:
1) go to the first item
2) change his contact name und click update
3) click on item 2 (the field is updated in the listbox.
4) click on item 1
5) change his contact name again and click update
--> the contact name of items 1 and 2 are modified in the listbox
What is wrong ?
And how can I update a record ?
if I change a field, click update and quit the application, the field has not the new value when I reopen it. I have to first go to an other item and then click 'update'.
Anybody can help me ?
Thanks a lot!
Daniel
|