Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ways to create a program event logging database

Status
Not open for further replies.

Aseem1234

Programmer
Nov 26, 2003
33
0
0
US
I apologize if this question is not supposed to be in this forum, but since I am using Foxpro to do it, I thought I would ask...

I am trying to create a program in which I can log many system and user events, such as if the user deletes a Customer or how many customers have logged into the program in the last hour, etc.

How does one go about designing a database for this? I am sure there are many links and sites on this, but I thought I would ask here if someone has already done it and could give me a clue.

And are triggers easy to work with in Foxpro 8.0? I was thinking about just using a global class that could be used to log events anytime during the program.

Any thoughts would be greatly appreciated! Thanks!
 
It's really just another table, and it really depends on what you want to Log. Data events can be handled by triggers, but Log in's would be different, unless you are also updating a user record. As far as "how many customers have logged into the program in the last hour", that of course would be a query against the log - not an even as such.

For a really good starting point, you might want to consider using FoxAudit ( At the very least, read the documentation to get a feel for somethings you might not have considered!

Rick
 


What version are you using?
In vfp7.0 and vfp8.0 you haveDatabase Properties
you can use:
like:
Modify date
Close data
AfterOpenTable
Etc....

You can specify to record the actions in a log file. Take a look at database container events in the help file.



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks a lot for all the help! It was really useful! I now have an idea of what to experiment with!
 
BPeisch, I downloaded the ErrLog.zip file and tried to run errlog.prg...I got a "System has encountered a problem...please contact programmer" error and then it just shut down Foxpro. Also, it said it could not find msgsvc.prg. Do I need to download this file also? Thanks!
 
The calls to MsgSvc are in the Err_Rpt form. If you look at the code, there's a call to Messagebox right above each of those that's commented out. Just comment out the call to MsgSvc and uncomment the call to Messagebox.


-BP (Barbara Peisch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top