The code is as follow:
method assign_accu_bal()
var
tc tcursor
sumit number
tBegin, tEnd, tOpen Time
endvar
sumit=0
tBegin = Time()
; tc.dmattach("acc_bal.db")
tc.Open("acc_bal.db")
tc.edit()
topen=time()
tc.home()
scan tc FOR tc.Account# = page.ACCOUNT#.Value :
message() tc.recno()
tc."UPDATED_BAL" = sumit + tc."BALANCE"
sumit = tc."UPDATED_BAL"
endscan
tc.endedit()
tc.home() ;// added home to return to top of table before resync to
TCursor
dmresync("acc_bal.db",tc)
tc.close()
tEnd = Time()
Message("Begin("+STRING(tBegin) +") End("+STRING(tEnd)+") Scan Took : "
+ STRING(Number(tEnd - tBegin) / 1000) + " " + STRING(Number(topen -
tBegin) / 1000) )
endMethod
Thanks for any comments.