>Greetings all,
>
>A Question: I'm needing to create a checksum value for a record in a table based on the data in each field. Does anyone have an algorithm to share or know of a third-party utility to do same?
>
>TIA
I have a ChkSum integer field in my tables to store the validated value. This is usually to detect hacking. If the ChkSum value is incorrect when I check, whatever feature that record or table is linked to is then disabled in the app until I, or the application manager, is notified and fixes it. The routine I use is something like:
local lnChkSum, i, lcFName
lnChkSum = 0
for i = 1 to fcount()
lcFName = field(i)
if lcFName = "CHKSUM"
loop
endif
lcData = transform(eval(lcFName), "@T")
lcVal = Sys[2007, lcData ]
lnChkSum = lnChkSum + val(lcVal)
endfor
return lnChkSum
Mark McCasland
Midlothian, TX USA