So, basically I create an application for my company, and it MUST be built using MS Access and must be built on SQL Server.
I made most of the plans, but it’s hard for me to determine how to handle the audit system.
Since it is used only internally, and you cannot even touch db from outside the building, we do not use the login system, since the program will be used only after the user has already logged into our internal network through Active Directory. Knowing this, we use the system to automatically determine the Active Directory username and with their permissions in one of the database tables, determining what they can or cannot do.
Thus, the actual audit table will have 3 columns (this design may change, but it does not matter for this issue); who (Active Directory user), when (add / remove / edit time), what (what was changed)
My question is how should I handle this. Ideally, I know that I should use a trigger so that it is impossible to update the database without registering an audit, however I do not know how I could capture an Active Directory user this way. An alternative would be to encode it directly in the access source so that whenever something changes, I run the INSERT statement. Obviously, this is not true, because if something happens to Access or the database is touched by something else, then it will not register the audit.
Any advice, examples or articles that can help me would be greatly appreciated!
source share