如何从存储过程调用c#函数? [英] How to call c# function from stored procedure ?

查看:91
本文介绍了如何从存储过程调用c#函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上我的网页上有一个c#功能。我需要从存储过程中调用此函数进行计算。



如何实现这一目标?

Actually I have one c# function in my web page. I need to call this function from Stored procedure for calculation.

How to achieve this ?

推荐答案

不,您无法从SQL Server调用网页功能。但是您可以在SQL Server 2005及更高版本的存储过程中调用.NET类库中编写的托管代码。



请参考以下链接。



在SQL Server 2005下执行.NET代码 [ ^ ]



http://blog.sqlauthority.com/2008/10/19/sql-server-introduction-to-clr-simple-example-of-clr-stored -procedure / [ ^ ]



https://msdn.microsoft.com/en- us / library / w2kae45k(v = vs.90).aspx [ ^ ]
No, you can't call a web page function from SQL Server. But you can call managed code written in .NET class library in your SQL Server 2005 and later version stored procedure.

Please refer below links.

Execute .NET Code under SQL Server 2005[^]

http://blog.sqlauthority.com/2008/10/19/sql-server-introduction-to-clr-simple-example-of-clr-stored-procedure/[^]

https://msdn.microsoft.com/en-us/library/w2kae45k(v=vs.90).aspx[^]


这篇关于如何从存储过程调用c#函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆