0

I experienced that a DevExpress XPO object belonging to a SQL table updates all columns in the table regardless of whether it has been changed. This has been a problem in our software since we moved from System.Data.SqlClient.SqlDataAdapter and System.Data.Dataset to DevExpress XPO. Our triggers use the COLUMNS_UPDATED() and update() functions which so report false result (from my point of view).

Is there a smart way to make XPO objects update only those columns that have actually changed?

mma
  • 381
  • 2
  • 15
  • 2
    *"so report false result"* they aren't false 'reports', you're just misunderstanding what they are documented to do; it returns true if the if an `UPDATE` is run against the column *even* if the column's value is unchanged. The [documentation](https://learn.microsoft.com/en-us/sql/t-sql/functions/update-trigger-functions-transact-sql?view=sql-server-ver16) explicitly states *"This is by-design"*. – Thom A Jan 26 '23 at 17:08
  • 1
    Seems like this was a design decision by DevExpress, [How to update to database only modified properties](https://supportcenter.devexpress.com/ticket/details/t919510/how-to-update-to-database-only-modified-properties). – AlwaysLearning Jan 26 '23 at 21:35
  • @Larnu You are right, my wording was ambiguous. I reworded the title and clarified the question. I hope it is clear now. – mma Jan 27 '23 at 06:04

0 Answers0