how does SqlCommandBuilder maintain a row's key value

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

Hi,

The SqlCommandBuilder class seems to be able to remember
the primary key of a row such that even if I change that
key's value, it is still able to update only that row.
So I would like to know how can I update a row even when
the primary key is changed by the user? From the row's
columns' information the original information seems to be
lost so that I can specify to update only the row with
the original primary key.

Thanks for anyone's advise!
 
The DataAdapter has a Diffgram that shows before and after values, actually
it's the dataset that has it, not the Adapter. So if you had a value of 1
in CustomerID for instance and you change it to 2, the effective query would
be Update MyTable Set CustomerID = 2 where CustomerID =1.
 
Back
Top