Hi Harrison:
Yes, there are a few reasons. Andy mentioned the possibility of you calling
.AcceptChanges on your datatable/dataset before calling update which is
essentially a guarantee that your changes won't be submitted to the database
b/c the rowstate of all of the rows will be reset. When you call update,
the adapter loops through the rows of the datatable and examines the
rowstate of each row. For each instance where it's modified, added or
deleted, it will call the respective command (provided one has been
provided) and execute it. So the first thing you need to do is verify that
you have changes to your dataset. Add a Debug.Assert(Not
DataSetName.HasChanges) right before you call update. If the assertion
fails, then the problem lies in the edit somewhere - basically for one
reason or another the modifications aren't visible.
Another common problem is using a try catch around update and eating the
exception without sending a notification or response - but you explicitly
mention "no error" message so this probably isn't the case.
The other likely problem is that the update command isn't matching anything
in the db.. however this will likely cause a concurrencyexception depending
on how you have your update logic configured.
In this case, the most likely case is that HasChanges is evaluating to
false. If that's the case it's good news b/c you'll probably just need to
call EndCurrentEdit or something similar.
If you would, verify the hasChanges and we'll take it from there. This may
also be helpful
http://www.knowdotnet.com/articles/efficient_pt4.html
HTH,
Bill
www.devbuzz.com
www.knowdotnet.com
Thanks!