Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which records were actually editted?
Message
 
 
To
11/04/2000 12:15:03
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00358128
Message ID:
00358161
Views:
15
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
      * there are no modified records left
      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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform