Can Sql Server Fire an event to ado.net?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

Can Sql Server Fire an event to ado.net?

Meaning...can I have a "trigger" raise an event that I can pick up via
ado.net?

What I'm trying to do is when a certain datafield is changed...my asp.net
app can respond to it

Best Regards,
Mekim
 
mekim said:
Hi all,

Can Sql Server Fire an event to ado.net?

Meaning...can I have a "trigger" raise an event that I can pick up via
ado.net?

What I'm trying to do is when a certain datafield is changed...my asp.net
app can respond to it

With Sql Server 2005 this will be trivial.

Until then, here's the general solution:

use sp_oaxxx procedures to create an (unmanaged) com componenet which does
the communication. msxml2.XMLServerHttp is a good candidate for this.

Write a .NET component, expose it for COM interop and (most important)
install it as a COM+ server application on the database server. Then use
the sp_oaxxx procedures to invoke it through an unmanaged COM proxy. If you
don't install it as a COM+ server application the CLR will get loaded in the
SqlServer process which is not supported.

David
 
What exactly do you expect to happen with an "event" in ASP.NET? Clients
are disconnected remember. You can't "push" a browser refresh, for example,
with someone sitting looking at an ASP.NET page in their browser, which is
just HTML by this point.

Jeff
 
Hi Jeff,

Very good question since I was unclear in my question

It would be the server side of the asp.net app that would pick it up...i.e
in global.asax which is active...

so...basically

1-Sql fires an event
2-ado.net picks it up in the Global.asax and sends out a webservice call

The steps David outlined seem a little intense to say the least...so I'm
waiting to get over caffinated before I attempt it :-)

Regards,
Mekim
 
The Global.asax cannot respond to events. It is not "running", and listening
for events. It is called syncronously from a client request.

What exactly do you want to do with the results of the webservice?

Jeff
 
Back
Top