Reputation: 33
Is it possible to catch add_Row
event if some other app changing my Access DB ?
I'am using OleDbConnection
for connecting to DB.
Upvotes: 2
Views: 66
Reputation: 4069
There's a few answers.
An event on the table itself:
If you are linking to a backend Access DB, then no.
If your tables are local, and you're using Access 2007+, then you can add what's called data macros.
With your table open, click in Table in your ribbon at top. Then choose the After Insert to start building your macro.
Looking past the table event and looking at form events, then yes. You have an After Insert event on the form. Using this, then it doesn't matter if the tables are local or linked. Nor does it matter what kind of DB you're linking to.
Upvotes: 0
Reputation: 7596
To my knowledge, it's not possible with MS Access.
If you were using other DB Engine (like SQL Server) maybe you can develop some trick using some trigger to invoke some .net code when a row is added in some tables.
But, in my opinion, especially on a DB/Server, one user shouldn't be able to track the action of other users (unless it'an admin).
Maybe you should develop your own "support table" to create your own "event management system", if this is a required feature for your application.
Upvotes: 1