• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1657
  • Last Modified:

How can I add additional reference to CLR stored procedure?

Hello,
I'm developing CLR stored procedure in C# for MS Sql 2005.
I need to use System.DirectoryServices but
I don't know how to add reference to this dll in my project???

Best Regards
FooKy
0
f_o_o_k_y
Asked:
f_o_o_k_y
1 Solution
 
digital_thoughtsCommented:
System.DirectoryServices isn't available in a SQL project in VS 2005 because its not an "approved" dll. Basically certain system assemblies are considered to not be used from inside SQL Server, because they can cause problems or they have not been fully tested from inside SQL Server.

But, you can register the assembly manually in SQL Server using the CREATE ASSEMBLY in SQL Server Management Studio. Once you've done that, the assembly will be available to reference from your SQL Server project. You will probably have to register the assembly as UNSAFE.
0
 
f_o_o_k_yAuthor Commented:
GREAT. :) Thanks that was it.
0
 
buri8128Commented:
This article describes how to add reference  to Linq so you could use the namespace System.Linq with all the linq operators.
http://luke.breuer.com/time/item/SQL2005_using_LINQ_in_SQLCLR/213.aspx
I wanted to use the Linq to xml in my CLR.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now