Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Buffered Data Committed too Soon
Message
From
25/01/1999 18:03:23
 
 
To
25/01/1999 17:17:13
Daniel Christensen
University of Wisconsin River Falls
River Falls, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00180029
Message ID:
00180047
Views:
17
>inserted into an audit table (assuming that the tableupdate() succeeds) The >problem is that by the time that I get to the routine, the control.value and >oldval(control.controlsource) are the same, even though I know that they
>have actually changed. Because the form only pulls up a single record and

Be sure you are comparing the oldval of the field with the current value of the field...

if oldval('MyField') = MyField

so

if oldval(controlname.controlsource) = eval( controlname.controlsource )

and not

oldval('control.controlsource') = eval( controlname.controlsource )


>Does anyone know why this is happening? Or perhaps, there is a better way of accomplishing this task while remaining independant of the table and form structure.

Of course, the much better way to do this is to write a Stored Procedure that will write to your audit file that you call from the Update/Delete/Change trigger for all tables you want to audit. Matter of fact, there was an article with code in the July 98 fox advisor on this.

BOb
Previous
Reply
Map
View

Click here to load this message in the networking platform