+1  A: 

In that snippet, the DataSet comes from session. When is it set ?

You certainly can use a DataSet in a WinForms application. Is it the databinding, you are having trouble with ?

driis
I am not understanding how the changes get into the DataSet in between the Setting of it and the Saving of it. Is that part of the binding? On my winform app how would I go about that?
Refracted Paladin
+1  A: 

Your problem is likely here:

 if (confirmChanges == DialogResult.Yes)
 {
      _personInfo.AcceptChanges();
      ConnectBLL.BLL.Person.Update(_personInfo);
 }

AcceptChanges sets the RowState to Unchanged on all rows that were ready to be updated. Frankly, it'd probably be better to use whatChanged as that'll keep your adapter from having to re-check for changed rows.

 if (confirmChanges == DialogResult.Yes)
 {
      ConnectBLL.BLL.Person.Update(whatChanged);
      _personInfo.AcceptChanges();
 }
Jacob Proffitt
+3  A: 

First,

If you want a good explanation of the issue that Jacob raised read the following article...

http://www.knowdotnet.com/articles/datasetmerge.html

And I agree with the others that you seem to be making it harder than it needs to be.

You are not clear what the ConnectBLL class is...is that a custom bizness object or a strongly typed dataset.

To do databinding which will automatically save would be a very long post so in lieu of that here are a couple of links.

http://www.codeguru.com/columns/vb/article.php/c10815
http://support.microsoft.com/kb/313482
http://msdn.microsoft.com/en-us/library/aa984336(VS.71).aspx

Those were the first links I found on google using (step by step instruction on winforms databinding with a strongly typed dataset) as the search string. You might find a better one. The codeguru link looked pretty good. The other to are more thorough at the expense of being more technical.

Best of all...if you can spring for Chris Sells book in winforms development, the chapters on data binding are excellent (along with all of the other chapters.)

http://www.amazon.com/Windows-Forms-Programming-Microsoft-Development/dp/0321267966/ref=sr%5F1%5F1?ie=UTF8&qid=1249525202&sr=8-1

Hope this helps.

Seth Spearman
If nothing else you get a +1 for the proper search string, which, believe it or not, is sometimes the biggest hurdle for a new solo dev.ConnectBLL is a custom Business Layer. I think my issue has to do with binding. A while back, when I started this project, a guy on the inter-tubes told me to never use MS data binding and that he always used his own. I now realize that I followed the first half of his suggestion without understanding the second part. Thanks for taking some time on an obviously `newb` question.
Refracted Paladin
In order to direct bind your biz objects to the UI the biz objs will have to implement certain interfaces...all nicely explained in Chris Sells book. Databinding can be squirrelly but when it works it works. Imagine doing this...me.myTextBox.DataBindings.Add("text",myBizObject,"MyBizObjectProperty") and then the inserting/updatinng just sort of automagically happens. Good luck.Seth
Seth Spearman