Roger,
We have a few major files that we keep track of certain fields, when they are updated, by whom, and retain in a history by reference, thus allowing users to see who changed what and when.
Our larger users want this for all master files, employees, customers,etc. There are probably a dozen files involved with anywhere from 15-50 fields each. Have you seen a method to check the fields before and after to see if changed without going thru the tedious code to check each var against the field, one by one, and recording in the history log. These programs, some written last century originally, have programmer defined variables, many added and deleted over the years.
Thanks
Fred
Omni
Change log file
Re: Change log file
I'm not sure how to answer this.
I would probably use Scatter() to Scatter the fields into an array and them use DC_ACompare() to compare the arrays.
I would probably use Scatter() to Scatter the fields into an array and them use DC_ACompare() to compare the arrays.
Code: Select all
aArray1 := CUSTOMER->(Scatter())
.. modify record
aArray2 := CUSTOMER->(Scatter())
IF !DC_ACompare( aArray1, aArray2)
DCMSGBOX 'Something has been changed!'
ENDIF
The eXpress train is coming - and it has more cars.
Re: Change log file
Roger,
You have an example which performs this really well, dbnotify().
I put in my wish list the docs for it, appears to be the cure.
Rick
You have an example which performs this really well, dbnotify().
I put in my wish list the docs for it, appears to be the cure.
Rick
Re: Change log file
Rick -
I forgot about that.
In fact, I even wrote a sample program:
\exp19\samples\dbnotify\dbnotify.prg
Thanks
Roger
I forgot about that.
In fact, I even wrote a sample program:
\exp19\samples\dbnotify\dbnotify.prg
Thanks
Roger
The eXpress train is coming - and it has more cars.