none
Framework v1 Sync by Designer Question RRS feed

  • Question

  • Is there an event similar to applychangefailed event where I can see an incoming change, test it for a certain condition and say not to apply a change?  I have not found such a way to do this and I have one small instance where I do not want a record to update on the client end, but it has nothing to do with a change conflict.  I'd appreciate any advice or input.
    Travich
    Friday, April 16, 2010 3:35 PM

Answers

  • Travich,

    use Remove instead e.g., DatasetX.TableY.Rows.Remove(rowToBeDeleted).

    Remember your code on ApplyChangeFailed? i think you have something similar there.

    JuneT

    Saturday, April 17, 2010 3:06 AM
    Moderator

All replies

  • have you tried ApplyingChanges or ChangesSelected to inspect the dataset?
    Friday, April 16, 2010 4:06 PM
    Moderator
  • Looking at apply changes now -- but if I find the change, how do I cancel it from being applied?  I see there's a rollback -- but will that rollback all transactions or just this one specific change?
    Travich
    Friday, April 16, 2010 4:12 PM
  • remove  the datarow from the dataset
    Friday, April 16, 2010 5:00 PM
    Moderator
  • That's just too easy.  :)

    Travich
    Friday, April 16, 2010 5:41 PM
  • Yikes when I call delete on e.Changes.Tables[0].Rows... that has the change, it actually DELETES the row from the client database.  Are you sure removing the row is supposed to have this behavior?  Is there another way of tackling this issue?

    If not I am going to try changing the value in the change of the row and see if that works.


    Travich
    Friday, April 16, 2010 6:29 PM
  • I don't recall the exact property of the dataset, nor do I know if it's read-only or not, but I think it's called .RowState and you may be able to set it to RowState.Unchanged?

    If you can't find it I'll look it up...

     

    Friday, April 16, 2010 7:24 PM
  • Travich,

    use Remove instead e.g., DatasetX.TableY.Rows.Remove(rowToBeDeleted).

    Remember your code on ApplyChangeFailed? i think you have something similar there.

    JuneT

    Saturday, April 17, 2010 3:06 AM
    Moderator