Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,075 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,785 people online right now. Registration is fast and FREE... Join Now!




How to monitor a database with a Windows service ?

 
Reply to this topicStart new topic

How to monitor a database with a Windows service ?

drjacky
26 May, 2008 - 12:15 AM
Post #1

New D.I.C Head
*

Joined: 25 Apr, 2008
Posts: 5

Hello,

I'm using VB.NET 2008 (framework 3.5).
I would like to check permanently if a new entry (row) is added to a table in particular, but I have no idea about how to do this... (is there some equivalent of the FileWatcher for DB ?...)

Thanks in advance smile.gif

Etienne
User is offlineProfile CardPM
+Quote Post

Vomster
RE: How To Monitor A Database With A Windows Service ?
3 Jun, 2008 - 07:38 AM
Post #2

D.I.C Head
**

Joined: 15 May, 2008
Posts: 52


My Contributions
I used a custom Windows Service to monitor a database and you could do the same.

If you're looking for new rows added, you could get a count of the number of rows and check to see if it's the same or has changed at each Timer.Elapsed.

User is offlineProfile CardPM
+Quote Post

drjacky
RE: How To Monitor A Database With A Windows Service ?
3 Jun, 2008 - 11:01 PM
Post #3

New D.I.C Head
*

Joined: 25 Apr, 2008
Posts: 5

QUOTE(Vomster @ 3 Jun, 2008 - 08:38 AM) *

I used a custom Windows Service to monitor a database and you could do the same.

If you're looking for new rows added, you could get a count of the number of rows and check to see if it's the same or has changed at each Timer.Elapsed.


Thanks for your reply.

I resolved my problem, just checking every x seconds all entries in my table ("Alert", with the timer_tick event) and deleting them.
I used a trigger to add an entry to "Alerts" every time an entry is added to "Message", so I could delete without any problem the content of "Alert"...
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 11:10PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month