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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error logging and trapping??

Status
Not open for further replies.

sparkbyte

Technical User
Sep 20, 2002
879
US
Does anyone have a solution for trapping and writing Access errors to either a SQL DB or a table within an ADP?

I had a simple error trap the do a screen pop with the error displayed to the user but I need to also send the errors to a SQL Server table or preferrably to a different DB on the Same SQL Server so that I can track muliple Access Projects with a single log.

Thanks!!!!!!!!!

Thanks

John Fuhrman
 
What's keeping you from writing a VBA function that is called from your error handlers and passes parameters to an SQL stored proc which writes everything to a table?

In the function you can define the connection string to point to any database on any visible server, not only to the database attached to that particular adp.



HTH

[pipe]
Daniel Vlas
Systems Consultant

 
Just looking for an example to start from. I am teaching myself VBscript and VBA, so starting from scratch is a little difficult yet. But if I have an example to referrence I can then apply the priciples to what i need and generally get to where I need to be.

Right now I am trying to decide which route I want to take.

1. Do as you suggested - Create auditing tables and have a function that writes entries to an auditing DB whenever certain things are done.

2. Use SQL Server functionality and audit on the back-end.
a. There are multiple ways this can be done.
i. Create auditing DB and scripts needed.
ii. Purchace shrink wrapped software solution. (difficult at best)

3. Create auditing tables in the current DB and do pretty much the same thing as option 1.

Thanks....

Thanks

John Fuhrman
 
Well, you said you wanted to log Access errors into Sql tables. FYI, it is impossible for any server to trap clients' errors. Therefore, any error that occurs in Access (VBA) must be trapped in VBA and sent to the server to be logged.

Server-side errors, on the other hand, can be managed directly by Sql, mainly through triggers.

Please explain what errors you want to log, as the strategies can be very different.





[pipe]
Daniel Vlas
Systems Consultant

 
Sorry, mixing up 2 different tasks.

1. I need a way to track client errors.

2. I need a way to audit who is doing what when.


#2 is the one that is going to get complicated.

A. Track table activity.
a. inserts, updates, deletes

B. Track sensitive data lookups (Selects)
a. I think I can do this by tying the lookup to a button on a form that its control source is a SP that writes audit data to a table each time it is used.

This is my 1st large Access project and as usual it is learn as I go.


Thanks

John Fuhrman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top