Groups | Blog | Home
all groups > sql server programming > august 2007 >

sql server programming : Can I add a reference to an external DLL in a managed CLR C# stored procedure?



Roman Rehak
8/3/2007 5:45:57 PM
You have to add the assembly to the database. Once it's there, you should be
able to add reference to it from your SQL CLR project in Visual Studio. It
should show a list of assemblies considered "safe" by Microsoft, plus a list
of assemblies loaded into the database.

This example loads System.Drawing:

CREATE ASSEMBLY [System.Drawing.dll]
FROM 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll'
WITH PERMISSION_SET = UNSAFE

Roman

--
Roman Rehak
http://sqlblog.com/blogs/roman_rehak

[quoted text, click to view]


sacha.stanton NO[at]SPAM gmail.com
8/3/2007 8:42:49 PM
Hi,

my managed CLR stored procedures are working fine, but I need to
import a .NET C# DLL that contains specialized functions I need to
call.

Is this possible? I can't seem to find any way to add the reference.

Thank you.
AddThis Social Bookmark Button