monitor table for updates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to monitor a table for updates, and when X records are entered that
match some criteria, I want to execute a subroutine.

Any ideas how to accomplish this?
 
Set a global variable equal to the number of records in the table when the
form opens. In the form's Close event, count the number of records again and
compare against the global variable. If the count is higher, records were
added in the form. So execute your subroutine. This will only work if you
can not delete records in the form. If you can, you need to adjust the
global variable every time you delete.
 
Thanks for the quick response. That sounds like it will work when the
records are entered via form. However, the records will be coming in via
ODBC insert. Do you have any other ideas?
 
Sorry, No!


ValerieA said:
Thanks for the quick response. That sounds like it will work when the
records are entered via form. However, the records will be coming in via
ODBC insert. Do you have any other ideas?
 
ValerieA said:
the records will be coming in via
ODBC insert. Do you have any other ideas?

Something outside the database which polls i.e. queries at regular
intervals; hash table on your key/unique column(s) to be able to detect
a change quickly; use a reverse locking strategy e.g. cannot update the
table without first adding an 'unlocking' row to a dedicated table,
meaning you would only have to poll this dedicated table for changes;
use an RDBMS which supports triggers :)
 
Back
Top