Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detect changes in DBF
Message
From
19/01/2018 07:33:48
 
 
To
19/01/2018 02:10:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 10
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01657364
Message ID:
01657373
Views:
53
>>Following problem: I have a DBF table that is open shared by multiple users. I like to detect if changes are done to the table, but since the table is opened shared and in use the timestamp of the actual DBF file does not change, until all users have closed the table.
>>
>>To do a query and comparison by content would be too slow. So I was wondering if there is some low level function approach I could use to detect the before-after differences? The simplest would be Reccount(), but I need to detect content changes where it does not change the recordcount.
>
>Christian,
>
>Use a trigger
>
>in the table properties, replace the trigger expression with the current trigger() AND yourtrigger()
>
>If it's an insert there's a change
>if it's a delete, there's a change
>
>if it's an update, you may need to compare ( don't remember) each field with its previous value - watch out for nulls when comparing
>
>Remember, within a trigger
>
>- you cannot modify the current table, not even go off the record
>- you can open, change and close other tables
>- restore the workarea if you have changed it

That would be a good idea, however I do not have a DBC. It is a very old database from FPW26 converted and it would be too much work to add a dbc.
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform