I have a class that I populate properties from a table in my database. I
create the properties in my class one for one with the columns in the tables
that I use to fill the class. Some properties are not loaded until a
function is called to load the properties when needed. In this class I have
about 50 properties that I expose to the client. The client, in turn, can
update most of the properties with new data, then call the update function.
So far so good.
However, I need to only update the properties that have changed. So I have
a Private Sub that records the table name, column name, old value, and new
value when a property is set and the values are different. This sub creates
a collection of property changes and then on the update I want to just send
the updates to the database.
Is there a better way to keep track of the properties that have changed for
the update function? I need to keep the old property value and the new
property value for auditing purposes. I was thinking of calling the
function on the property set function.
John