SQL存储过程可以调用.NET对象吗?

发布于 2024-09-27 06:52:20 字数 129 浏览 2 评论 0原文

SQL 存储过程是否可以调用 .NET 对象?在我的情况下,我需要获取一个字符串参数并返回一个可由我的安全客户端使用的哈希结果。

我可以根据每个结果调用此 SP(每行一次),也可以返回多行。这完全取决于 SQL 将支持我做什么。

Is it possible for a SQL Stored Procedure to call a .NET object? In my situation, I need to take a string parameter and return a hashed result that can be consumed by my secure client.

I can either have this SP called on a per result basis (once per row), or I can possibly return multiple rows. It all depends on what SQL will support me doing.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

驱逐舰岛风号 2024-10-04 06:52:20

SQL Server 2005 将 CLR 引入到服务器中。这允许您编写 .NET 函数并从 SQL Server 存储过程中调用它们。

阅读此指南了解如何在 SQL Server 中创建和使用 CLR。

这适用于 SQL Server 2005 及更高版本。

SQL Server 2005 introduced CLR into the server. This allows you to write .NET functions and call them from within SQL Server stored procedures.

Read this howto on how to create and use CLR within SQL Server.

This will work in SQL Server 2005 and above.

情仇皆在手 2024-10-04 06:52:20

You can write sql stored procedure in C# by using Sql Clr which will allow to call .Net object.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文