Solved

Monitoring a database for changes with ADO

Posted on 2002-05-13
2
259 Views
Last Modified: 2006-11-17
I am trying to monitor a database for additions, changes or deletions.  The changes come from a third party app that I do not have source for.  I know the app uses ADO because it installs the latest version of ADO when it is installed.

I need real-time performance from the database so I've decided to cache all the data in memory while my application is running.

However, to keep the cache up-to-date with the database, I need some way of being notified when a change takes place so I can update the cache.

Will ADO provide the kind of events I'm looking for?
0
Comment
Question by:jlalande
2 Comments
 
LVL 22

Accepted Solution

by:
DrSQL earned 200 total points
ID: 7009571
jlalande,
   If I understand your question correctly, I think you're looking the wrong place.  It is the database that knows when it has been changed, not ADO.  What DB engine are you using?  If it has the ability to create triggers, then it could populate a database structure or perhaps run a java applet that would tell your app whether there were changes.  ADO is just the objectification layer/interface.

   It might mean regularly polling a simple DB structure, but would still allow you to update your cache in a more timely fashion (and based upon actual activity rather than a time interval).

Good luck!
0
 

Author Comment

by:jlalande
ID: 7009606
DrSQL

Thanks for your comments.

The third party app uses either SQL Server or dBase depending on what the user selects at install time.  I think the default is dBase.

I considered the trigger approach but wasn't sure if my program could add triggers to another application's database.  I should do more research and experimentation.

I was intrigued by the ADO approach since two more third party apps we have to work with actually generate COM events when they update their databases...though there databases are in a proprietary format.

But if ADO won't do the trick, I'll follow your suggestion.

Thanks
John
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now