W.G. Ryan
12/7/2007 3:36:00 PM
Zeeshan:
Just to be clear, you would only want to call AcceptChanges if you *didn't*
want rows updated back on the database side. When an adapter has Update
called, it loops through each row examining the RowState values of each row.
If the RowState is unchanged, then it just moves on to the next row.
AcceptChanges does precisely that, setting the RowState to unchanged. So if
you had the following:
DataSetName.AccpetChanges();
DataAdapterName.Update(DataSetName);
you could guarantee that nothing would be updated on the back end.
Just to be clear, i wasn't in any way trying to nitpick or be critical,
rather, I just wanted to make sure there wasn't any confusion b/c in this
case, it could cause some confusion..
Cheers,
Bill
"Zeeshan Gulzar" <ZeeshanGulzar@discussions.microsoft.com> wrote in message
news:2A63532F-A0D3-4720-8BEB-EA752917EF52@microsoft.com...
> Should you call DataSet.Tables[0].AcceptChanges() before this line. It is
> necessary to accept changes first and then call update.
>
> "Brian" wrote:
>
>> Hi,
>>
>> I have a typed dataset that is based on a SQL view, so I have added a
>> stored
>> procedure to save the data (that the TableAdapater found and populated).
>>
>> However when I execute "Adapter.Update(DataSet.Tables[0])", absolutely
>> nothing happens - no errors, no sql commands. Is there anything obvious
>> I'm
>> doing wrong? How do I debug this?
>>
>> Thanks,
>> Brian
>>
>>
>>