4 Replies - 7487 Views - Last Post: 24 March 2011 - 11:33 AM Rate Topic: -----

#1 drjacky  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 25-April 08

How to monitor a database with a Windows service ?

Post icon  Posted 26 May 2008 - 01:15 AM

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

Etienne
Is This A Good Question/Topic? 0
  • +

Replies To: How to monitor a database with a Windows service ?

#2 Vomster  Icon User is offline

  • D.I.C Head

Reputation: 13
  • View blog
  • Posts: 198
  • Joined: 15-May 08

Re: How to monitor a database with a Windows service ?

Posted 03 June 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.
Was This Post Helpful? 0
  • +
  • -

#3 drjacky  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 25-April 08

Re: How to monitor a database with a Windows service ?

Posted 04 June 2008 - 12:01 AM

View PostVomster, on 3 Jun, 2008 - 08:38 AM, said:

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"...
Was This Post Helpful? 0
  • +
  • -

#4 chitti76  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 24-March 11

Re: How to monitor a database with a Windows service ?

Posted 24 March 2011 - 10:56 AM

View Postdrjacky, on 04 June 2008 - 12:01 AM, said:

View PostVomster, on 3 Jun, 2008 - 08:38 AM, said:

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


Hi there, Can you pls elaborate more on how you resolved this. I have a similar work to be done, upon row addition a windows service needs to fire email for approval.
thanks
chitti
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13954
  • View blog
  • Posts: 55,700
  • Joined: 12-June 08

Re: How to monitor a database with a Windows service ?

Posted 24 March 2011 - 11:33 AM

FYI this post was from three years ago and the OP hasn't been on since two years ago. You might be waiting a while.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1