Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Trigger Callback to a Different Client

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-02-06 : 07:38:52
Chip writes "I'm looking for a way for an event (e.g. an UPDATE to a Table) to trigger execution of code in another database client.

I see your examples here that install a Trigger and then get a reference to a COM object and call methods on that COM object (e.g. the SMTP Mail example).

It looks like I could get there doing that, but it seems a long way around to instantiate (or get a reference to) a COM object and call a method on it which then communicates to my other client application (a C++ application in my case).

Pointers to examples or books would be most welcome.

We're using SQL Server 7.0 for now, possibly targeting MSDE in the future, if that matters.

Thanks."

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-02-06 : 08:07:46
Hi

Ok. You want your second client app to have an event fire, but you don't want to have to call it directly, understandable. Becuase, what if that other client isn't online ?

What about another way around it.

What if you had a table where you stored events to be queued. Your first process puts an entry in there with the instruction.

The second client polls that table every 5 seconds or something and looks to see if it has any jobs waiting.

Alternatively, look at MSMQ (message queue), that is what it is designed to do.

This may not suit your need, but it may be worth considering.

Damian
Go to Top of Page
   

- Advertisement -