Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bernard Bout
  Where is Bernard Bout?
 Bernard Bout
 To: Rob Vleeschhouwer
  Where is Rob Vleeschhouwer?
 Rob Vleeschhouwer
Subject: RE: updated()
Thread ID: 104196 Message ID: 104198 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Sunday, August 13, 2006 3:33:47 AM         

> Hi,
> In VFP the function UPDATED() is not longer supported. What I have done to see if a record was changed, is compare, in a loop, each field in that record with the OLDVAL() of that record. There must be a better way. And how can I see if a table is changed. P.e. a grid representing a salesorder.
> Rob

There certainly is. Use the method VFP Cursor Adapters use.


From Help:

You can specify –1 for nFieldNumber to return a character string consisting of deletion and modification status values for all fields in the table or cursor. For example, if a table has five fields and only the first field has been changed, GETFLDSTATE( ) returns 121111. The 1 in the first position indicates the deletion status has not been changed. But "2" shows that field 1 has been changed.

111211 means that field 3 has been changed.
2111211 means that the record has been DELETED and field 4 has been changed.

Just check the string returned. If all are 1's then no change.


updated() Posted by Rob @ 8/13/2006 12:37:16 AM
RE: updated() Posted by Bernard Bout @ 8/13/2006 3:33:47 AM