Home All Groups Group Topic Archive Search About

Need help with windows service being "database aware"

Author
21 Jul 2006 4:46 PM
rhaazy
My situation is this.
using mssql 2000:

I have a series of tables.  Each table is designated for a particular
"profile"
There are lets say 4 profile tables.  Each table has a list of assets
in them.  Then the information pertaining to that particular profile
for that particular asset.

There is going to be a GUI that lets the user alter these tables.

I have a windows service running on the server that supports the
tables.

I somehow need a way for the windows service to know a change was made
to any one of those tables, and then upon there being an update
generate an xml document.

I know how to generate the xml document, I'm having trouble figuring
out how to make the service aware that a change was made to the
database.  is there someway that the database can tell the service
whats going on?   Or is the service gonna have to check the server say
every 5 minutes and figure out if a change was made?

Any help would be appreciated. thanks!

Author
21 Jul 2006 5:45 PM
Tracy McKibben
rhaazy wrote:
Show quote
> My situation is this.
> using mssql 2000:
>
> I have a series of tables.  Each table is designated for a particular
> "profile"
> There are lets say 4 profile tables.  Each table has a list of assets
> in them.  Then the information pertaining to that particular profile
> for that particular asset.
>
> There is going to be a GUI that lets the user alter these tables.
>
> I have a windows service running on the server that supports the
> tables.
>
> I somehow need a way for the windows service to know a change was made
> to any one of those tables, and then upon there being an update
> generate an xml document.
>
> I know how to generate the xml document, I'm having trouble figuring
> out how to make the service aware that a change was made to the
> database.  is there someway that the database can tell the service
> whats going on?   Or is the service gonna have to check the server say
> every 5 minutes and figure out if a change was made?
>
> Any help would be appreciated. thanks!
>

Since you're on 2000, yes, you're going to have to poll the database.
If you were on 2005, you could make use of Notification Services...



--
Tracy McKibben
MCDBA
http://www.realsqlguy.com

AddThis Social Bookmark Button