Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which records were actually editted?
Message
 
 
To
11/04/2000 12:55:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00358128
Message ID:
00358264
Views:
17
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...
>
>
Nadya,
>Gee tagged code is hard to strip:)Similar but not quite. getnextmodified() would return negative values for "appended" records.
>
>
> lnRecno=GetNextModified(0) && Start to get modified
> do while lnRecno#0
>   if lnRecno>0 && this record was modified
>      go lnRecno
>      replace modidate with datetime()
>   else
>      * record was appended
>      * if not default datetime inserted do it for it too
>   endif
>   lnRecno=GetNextModified(lnRecno) && Get Next modified record
> enddo
Cetin

Sorry, I have unrelated, but very important question for you: in your Expanded EditBox if I go to another field with Tab, it works fine, but if I try Mouse Click, it shows me an Error message: "Record outside the range". What should I do?
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