Can Sql Server Fire an event to ado.net?

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
 
D

David Browne

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
 
J

Jeff Dillon

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
 
G

Guest

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
 
J

Jeff Dillon

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top