Showing posts with label extended. Show all posts
Showing posts with label extended. Show all posts

Friday, February 24, 2012

How to use C# DLL in Extended Stored Procedure?

Hello,

i have created one C# DLL

xp_hello.dll

Its having below code in Class1.cs

namespace xp_hello

{

public class Class1

{

public string xp_hello()

{

string strReturn = string.Empty;

strReturn = "Chirag Patel";

return strReturn;

}

}

}

i compiled that DLL and kept it in C drive.

now i am trying to create Extended stored procedure using

sp_addextendedproc 'xp_hello', 'c:\xp_hello.dll'

its showing successful creation.

Now i am trying to Execute it with

DECLARE @.txt varchar(33)

EXEC xp_hello @.txt OUTPUT

now its showing below message.

Msg 17751, Level 16, State 0, Procedure xp_hello, Line 1

Could not find the function xp_hello in the library xp_hello.dll. Reason: 127(The specified procedure could not be found.).

can anyone please help me out in this?

Thanks

Extended stored procedures are C++ coded. If you want to use the CLR you will have to use the SQL CLR project / the CLR integration in SQL Server. (which is available in SQL Server 2005)

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

Hello Jens,

Thanks a lot.

its done. i able to call C# DLL from Stored Proc.

Great,

Thanks.

Sunday, February 19, 2012

how to use .Net Assembly file(DLL) in SQL Ser(2000) Extended Proce

Hi,
Can anyone tell how to use .Net Assembly file(DLL) in SQL Server(2000)
Extended
Procedure.
regards,
Sivaraman.SThis is not currently supported. See
http://support.microsoft.com/default.aspx?scid=kb;en-us;322884.
You'll have a lot more options in SQL 2005, though.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Sivaraman.S" <SivaramanS@.discussions.microsoft.com> wrote in message
news:82A0A7B5-5D65-420A-A3BA-ADF0BE2FB50F@.microsoft.com...
> Hi,
> Can anyone tell how to use .Net Assembly file(DLL) in SQL Server(2000)
> Extended
> Procedure.
> regards,
> Sivaraman.S
>

how to use .Net Assembly file(DLL) in SQL Ser(2000) Extended Proce

Hi,
Can anyone tell how to use .Net Assembly file(DLL) in SQL Server(2000)
Extended
Procedure.
regards,
Sivaraman.S
This is not currently supported. See
http://support.microsoft.com/default...;en-us;322884.
You'll have a lot more options in SQL 2005, though.
Hope this helps.
Dan Guzman
SQL Server MVP
"Sivaraman.S" <SivaramanS@.discussions.microsoft.com> wrote in message
news:82A0A7B5-5D65-420A-A3BA-ADF0BE2FB50F@.microsoft.com...
> Hi,
> Can anyone tell how to use .Net Assembly file(DLL) in SQL Server(2000)
> Extended
> Procedure.
> regards,
> Sivaraman.S
>

how to use .Net Assembly file(DLL) in SQL Ser(2000) Extended Proce

Hi,
Can anyone tell how to use .Net Assembly file(DLL) in SQL Server(2000)
Extended
Procedure.
regards,
Sivaraman.SThis is not currently supported. See
http://support.microsoft.com/defaul...b;en-us;322884.
You'll have a lot more options in SQL 2005, though.
Hope this helps.
Dan Guzman
SQL Server MVP
"Sivaraman.S" <SivaramanS@.discussions.microsoft.com> wrote in message
news:82A0A7B5-5D65-420A-A3BA-ADF0BE2FB50F@.microsoft.com...
> Hi,
> Can anyone tell how to use .Net Assembly file(DLL) in SQL Server(2000)
> Extended
> Procedure.
> regards,
> Sivaraman.S
>