Web Service from aspx

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

Guest

Hi
is it possible to call a web service from inside SQL Server in any way? If yes, how

Basically I am trying to fire a insert trigger, which will select some data from a table and instantiate .Net dll and populate its properties with the table data. I know there are other ways to do it but i would like to know if there is a way to achieve the above as well

Any help would be appreciated

Thanks
- Monidee
 
any module which can address a url can call into the webservice. otherwise
it can't. i'd hesitate to advise you to tie a trigger to a webservice as
that, to me, is tight coupling. A change in the webservice interface or
address will break the trigger which is not necessarily a good thing IMHO.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
RR said:
Hi,
is it possible to call a web service from inside SQL Server in any way? If yes, how?

Basically I am trying to fire a insert trigger, which will select some
data from a table and instantiate .Net dll and populate its properties with
the table data. I know there are other ways to do it but i would like to
know if there is a way to achieve the above as well.
 
RR said:
Hi,
is it possible to call a web service from inside SQL Server in any way? If yes, how?

Basically I am trying to fire a insert trigger, which will select some
data from a table and instantiate .Net dll and populate its properties with
the table data. I know there are other ways to do it but i would like to
know if there is a way to achieve the above as well.
Any help would be appreciated.

There was a similar question in the C# newsgroup just recently (search for
"c# and ms sql triggers").

In theory, you could e.g., write a C# class that calls the web service and
expose it as a COM component. You could then call the COM component from the
SQL trigger.

However I do not think this is a realistic approach for any serious use. For
starters, calling a COM component from a trigger is relatively slow already,
and the inevitable overhead of the web service call would make this approach
impractical. You want your trigger to execute as quickly as possible to
avoid bogging down the database.

Not knowing your exact requirements its hard to say, but one way of doing
this would be to write an extended stored procedure in unmanaged C++ and
call it from the trigger. This extended stored procedure would just place a
message in an MSMQ queue. Another application would then read the message
from the queue and call the web service. This way the trigger would be
decoupled from the web service call.

Sami
www.capehill.net
 
Back
Top