Solved

Monitoring a database for changes with ADO

Posted on 2002-05-13
2
247 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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.
Read about achieving the basic levels of HRIS security in the workplace.
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…

744 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

11 Experts available now in Live!

Get 1:1 Help Now