Thanks
Dennis,
I have been using revision numbers but I make so many edits (often
during RT Testing) that it is too easy to apply the code without
incrementing the revision number. It has happened way too many times
that same-name files contained slightly different code, when this
happens a lot of time can be wasted trying to get the remote person in
sync. That is why I want to automatically sample the DateTime the
formula is last modified. If this is not possible then the best
solution is to sum all DTs in the master folder. This folder however
may contains files not used by the system (Docs etc) and also sometimes
files used by the system are located elsewhere.
Not sure yet how to solve this yet... I have a feeling I am missing a
simple solution. Perhaps Windows Live Sync works better than I
expect... however I noticed that there is a delay before files are
updated - this is what worries me - one could apply a formula before it
was updated.
best regards,
herman
|
Herman,
Good idea. One possibility is build it into each module. If your
formulas are based on smaller include modules, then you can include a
sequence number based on a shortened date and edit number of the last
change 20100227 edit 1 (e.g., 00227.01), then any edits to the code
requires bumping the sequence number in the first line of the code:
checksum += 00227.01;
Your top level system:
checksum = 0;
theExpectedChecksum = someConstant;
// All the includes go here
If (checksum != theExpectedChecksum )
{
//popup the expected vs calculated result
}
The first time after a change, the warning will give the right result
that can be edited into the top level value of theExpectedChecksum.
BR,
Dennis
On Feb 27, 2010, at 10:07 AM, Herman wrote:
Hello,
I would like to create a System-CheckSum, for example sum the
last DateTime of each of the component formulas and/or data files used
by the system. This would provide me, based on a single number, a way
to verify that all computers are using the same code and using the same
data files. I know files are supposed to be synchronized but I would
feel better if there were an additional Check. I can't simply sum the
DT of all shared files because not all are always used.
I played with the code below and even tried using an include to read
the DateTime of the formula including it. But I can't get it to go.
There must be an easier/better way but it has to be automated.
Is anyone doing this or have any ideas?
Thanks,
herman
Filename = "C:\\SharedFormulas\\"+StrLeft(_DEFAULT_NAME(),StrLen(_DEFAULT_NAME())-2);
FileModified= fgetstatus( Filename, 1, 3 );
// CheckSum = sum of FileModified DTs
|