C
CNHS
I am trying to compare the original value of a specified column to its new
modified value, using the DataViewRowState filter. However, both the
original value and the new value are returning the new value. Can anyone
figure out what I am doing wrong?
Here is the code:
rowsOriginal = DsVendors1.TBL_VENDORS.Select("", "",
DataViewRowState.ModifiedOriginal)
rowsCurrent = DsVendors1.TBL_VENDORS.Select("", "",
DataViewRowState.ModifiedCurrent)
daVendors.Update(DsVendors1, "AP_TBL_VENDORS")
I put in the last line of code to show you that I am not calling the Update
until after I set the rows. I know calling the Update would call
AcceptChanges and then I would not have any Modified rows at all. I am
changing a value in the TBL_Vendors, but when I check that value in
rowsOriginal and rowsCurrent, they both return the new value. I know I have
Modified rows because the rowsOriginal.Length and rowsCurrent.Length are
both =1.
Can anyone help?
modified value, using the DataViewRowState filter. However, both the
original value and the new value are returning the new value. Can anyone
figure out what I am doing wrong?
Here is the code:
rowsOriginal = DsVendors1.TBL_VENDORS.Select("", "",
DataViewRowState.ModifiedOriginal)
rowsCurrent = DsVendors1.TBL_VENDORS.Select("", "",
DataViewRowState.ModifiedCurrent)
daVendors.Update(DsVendors1, "AP_TBL_VENDORS")
I put in the last line of code to show you that I am not calling the Update
until after I set the rows. I know calling the Update would call
AcceptChanges and then I would not have any Modified rows at all. I am
changing a value in the TBL_Vendors, but when I check that value in
rowsOriginal and rowsCurrent, they both return the new value. I know I have
Modified rows because the rowsOriginal.Length and rowsCurrent.Length are
both =1.
Can anyone help?