Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top