Tracking or notifying DB changes - inserts and updates are mostly
How to track or receive notifications when a record is inserted or updated in the DB? I would like to notify an external application of changes in near real time when such changes occur in the DB. Are there independent DBMS tools and application programming languages? If not, is it possible with MS Access and MS SQL Server? I try to avoid polling the DB continuously, of course.
source to share
In MS-Access, I track record changes or record additions with fields in the main table that store the user's name and the date the record was created or updated.
You need to use the windows API to capture the username, usually invoked when the switch form is opened.
I dig to find off to track specific changes. My database is used for project management. I would like to keep track of exactly what has changed, not just who and when I have.
I think this fits the requirements of the original question. I can later add a windows API that reads the username.
Closed Sub Form_BeforeInsert (Undo as Integer) Me! UserCreated = UCase (CurrentUser ()) Me! DateCreated = Now () End Sub
Private Sub Form_BeforeUpdate (Undo as Integer) Me! DateModified = Now () Me! UserModified = UCase (CurrentUser ()) End Sub
- Mike
source to share
To do this with SQL Server, you use a notification service - write a DLL that subscribes to notifications from the database for data updates that you can handle in some way.
However, MS stated that they are removing this from SQL Server 2008 .
Oracle has something similar (although they tend to leave their technologies in place), but I haven't seen anything neutral in the database.
source to share