Friday, February 17, 2012

Creating DLL file for Extended Stored procedure in C#

Hi All,

Is there any way that I can create a dll file for Extended stored procedure(SQL server) in C# ?

I an able to create that in VC++. in VC++ there is DLLMain which serve as entry point and a paramter can be passed to it using Extended stored procedure. But since C# does not have any such entry point. Hence is there any way that I can achieve this?

Any pointers to this will be highly appreciated.

Thanks

Sid

No you can not write an xp in C#, but why not write a SQLCLR method in C# instead and upload that dl to SQL Server? Look for .NET programming in BOL to get more about what you can do.

Niels
|||

If you use SQL Server 2005 then you can use the .NET CLR inside your SQL Server.

If you use SQL Server 2000 still you have to use the COM dlls.

In SQL Server 2005 you need not to have the Extended SPs, the CLR integration helps you to overcome this issue, the deployment and maintaining the CLR assemblies are much better than the legacy COM dlls.

If you use SQL Server 2005, use the .NET CLR integration...

|||

Thanks manivannan,

Your comments helps. I finally ended up using VC++.NET to create the DLL for extended stored procedure.

No comments:

Post a Comment