monitor table for updates

V

ValerieA

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?
 
P

PC Datasheet

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.
 
V

ValerieA

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?
 
P

PC Datasheet

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?
 
P

peregenem

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top