Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Audit Trail using a grid to modify data
Message
From
19/06/2003 22:13:22
 
 
To
19/06/2003 20:27:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00801858
Message ID:
00802034
Views:
27
I could learn about these triggers, but I was hoping to find a quicker easier way to do it. Do you know of an easier way to do this with grids?

Kev



>I am using a grid in some cases to modify data directly in the grid with the columns' datasource linked to certain fields. I like to keep an audit trail showing when data is changed, who made the change, what the old value was, new one, etc. With text boxes, we have the got focus and lost focus, so I store the value of the field/object in gotfocus into a temp variable, then in lostfocus, if the new value of the field is different than the temp variable, then I use my audit trail table and log the changes. The problem is that columns in grids don't have lost and gotfocus events. They have before/after row change, but that could go up or down and involve inefficient code. Does anyone have any good suggestions of how I can EFFICIENTLY perform this task doing modifications on fields within a grid?
>
>Kev
>
>- Appreciate a normal day, it is always better than a bad one.

If you use triggers, any change will be recorded, whether it be from a grid, a BROWSE window, a REPLACE command, etc.

If these are new concepts for you, see my following introductory articles:

Triggers: http://www.levelextreme.com/Magazine/June2002/Page21.asp

Audit-trail (using triggers): http://www.levelextreme.com/Magazine/May2003/Page18.asp

HTH,

Hilmar.
"The earth is but one country, and mankind its citizens." (From the Holy Scriptures of the Bahá'í Faith)
``` Appreciate a normal day, it is always better than a bad one ```

Kev
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform