I have an CalendarInfo that is bound to a DataSet and I am using standard VS2005 Data Binding to create the adapters.
I need to update a few fields of the appointment programtaically, which I do by changing the members of the appropriate Appointment object. However I sometimes find that when I call the adapter Update method, I get a DBConcurrencyException because no rows have been updated. THis leads me to think the problem is that, changing the first member triggers an update , so that when I change the second member the updat eis being rejected since the database field no longe rmatches the original value for the field. Is there any way to suppress the notifivation of the rows changing or do I have to do do it externally.
Thanks
Pat
I was setting the properties of an Appointment object which mapped down to an UPDATE statemrnt being geenrated to update the corresponding row in the database. I eventually discovered the problem was that Table adapter had been geenrated reference some databse cloumns that were not bound to fields in the Appointment object. When these additional fields had been changed, the UPDATE failed as the UPDATE statement was checking that all fileds in the database had the same values as when original retrieved from th edatabase. THe addiitonal fileds had been changed outside og the adpater so it was rejecting the update as an apparent concurrency update failure.
What do you mean by fields of an appointment? Can you explain it further.
Thanks,
After performing the first SQLDataAdapter.Update you need to call the DataSet.AcceptChanges method
Subsequent updates to rows should not be rejected. Subsequent Adapter.Update calls should then work
Hope this helpsCheersAaron