Running ASP.Net code from inside a stored Proc

Andy Green
Andy Green used Ask the Experts™
on
I have a vague recollection of reading somewhere that it is possible with SQL Server 2005 to access the .net framework from inside a stored proc.

Is this right, and can it be made to query a web service?

Any examples would be great.

Andy
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
SQL Server DBA & Architect, EE Solution Guide
Awarded 2009
Distinguished Expert 2018
Commented:
>> Running ASP.Net code from inside a stored Proc

ASP.Net code is not possible.
I hope you refer to CLR Programming done using VB and C# .Net languages.

>>  it is possible with SQL Server 2005 to access the .net framework from inside a stored proc.

.Net framework can be utilized to take full use of the Client machine resources effectively.

>> Is this right, and can it be made to query a web service?

No. you can't make a web service out of it.

More info on CLR Programming below:

http://msdn.microsoft.com/en-us/library/ms131102(SQL.90).aspx
http://msdn.microsoft.com/en-us/library/ms345136(SQL.90).aspx

Hope this helps
It's just managed code.

I don't see any reason why you couldn't call a web service. You should be careful, of course, when calling services that can potentially take a long time to return, and possibly fail. You wouldn't want to do so in things like triggers that fire on user updates, or in queries that users will be waiting for.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial