Hi Cetin,
>>>
>>>I have a table in optimistic Table buffered mode. When my form is in EditMode, I can edit records, then I want to save my changes. I issue TableUpdate. My question is: how can I determine, which records were actually updated? I want to replace modidate field with datetime() for these particular records.
>>>
>>> Could it be done in Update trigger instead, if this table is a part of database? I rare use triggers, so I'm not sure, how would it be done...
>>>
>>> Thanks in advance.
>>
>>
Nadya,
>>Check getnextmodified() and fldstatus().
>>Cetin
>
>
Ooops. Peter's is correct. It's getfldstate() not fldstatus() :)
>Cetin
I'm currently use GetNextModified(0) to determine, if I made some changes.
So, the procedure should looks like:
lnRecno=0
do while .t.
lnRecno=GetNextModified(lnRecno) && Get Next modified record
if lnRecno>0 && this record was modified
go lnRecno
replace modidate with datetime()
else
exit
endif
enddo
Right? I just create this code, haven't tested yet...
If it's not broken, fix it until it is.
My Blog