- How to implement efficient transaction logging in VFP6? 
Author Message
 - How to implement efficient transaction logging in VFP6?

I need some simple and yet efficient way to keep track of what data was
changed during each data session. I.e.: a user edits some fields on the form
and, before closing, the changes are saved (in a log table presumably) for
future reference.
I am not quiet sure whether I should be going through each record and field
and doing CURVAL(), OLDVAL(), GetFldState() in a loop with GetNextModified()
type thing.
Is there a more efficient way of getting through this?
Any suggestions are appreciated.


Sun, 28 Aug 2005 02:02:30 GMT  
 - How to implement efficient transaction logging in VFP6?
Rather than spend a lot of time "reinventing the wheel", consider FoxAudit -
http://www.takenote.com/foxaudit.htm. For the price, it'll pay for itself in no time!

Rick

Quote:

> I need some simple and yet efficient way to keep track of what data was
> changed during each data session. I.e.: a user edits some fields on the form
> and, before closing, the changes are saved (in a log table presumably) for
> future reference.
> I am not quiet sure whether I should be going through each record and field
> and doing CURVAL(), OLDVAL(), GetFldState() in a loop with GetNextModified()
> type thing.
> Is there a more efficient way of getting through this?
> Any suggestions are appreciated.



Sun, 28 Aug 2005 02:10:36 GMT  
 - How to implement efficient transaction logging in VFP6?
CREATE TRIGGER ON <table< FOR UPDATE AS Logit()
Stored PROCEDURE LOGIT
LOCAL lcStatus
lcStatus=GetFldState(-1)
IF "2" $ lcStatus
 INSERT INTO Log.DBF VALUES (SYS(0), DATETIME(), ALIAS(), lcStatus)
ENDIF
There's always a getfldstate if there's a trigger.
-Anders


Quote:
> I need some simple and yet efficient way to keep track of what data was
> changed during each data session. I.e.: a user edits some fields on the
form
> and, before closing, the changes are saved (in a log table presumably) for
> future reference.
> I am not quiet sure whether I should be going through each record and
field
> and doing CURVAL(), OLDVAL(), GetFldState() in a loop with
GetNextModified()
> type thing.
> Is there a more efficient way of getting through this?
> Any suggestions are appreciated.



Sun, 28 Aug 2005 03:59:37 GMT  
 - How to implement efficient transaction logging in VFP6?
There was a article in Foxpro Advisor how to do this, though it was
some time ago.



Quote:
>I need some simple and yet efficient way to keep track of what data was
>changed during each data session. I.e.: a user edits some fields on the form
>and, before closing, the changes are saved (in a log table presumably) for
>future reference.
>I am not quiet sure whether I should be going through each record and field
>and doing CURVAL(), OLDVAL(), GetFldState() in a loop with GetNextModified()
>type thing.
>Is there a more efficient way of getting through this?
>Any suggestions are appreciated.



Mon, 29 Aug 2005 06:18:43 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. transaction logging

2. Transaction logging utility/FoxAudit 6.0??

3. Logging Events to the NT Event Log from VFP

4. Crystal Reports - Implementing in VFP6 (Basic advice)

5. Implementing a Colleciton in VFP6?

6. Teechart OCX with VFP6.0 (Log scales problems)

7. VFP6-Getting logged in user name?

8. Controlling SQL Server transactions in VFP6

9. VFP6.0/SP3, transactions

10. VFP6 Transaction problems. Re-post

11. VFP6 Problem after issuing END TRANSACTION

12. Any efficient way to refresh menu item?

 

 
Powered by phpBB® Forum Software