Showing posts with label dll. Show all posts
Showing posts with label dll. 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.

How to Use Business Logic DLL

In my company, we have an extensive Business Logic Layer class library that
is used for several development projects. This works great for re-use and
streamlining project development. We would also like to extend this
capability to reporting services activities within the corporation. How can
we define a report in reporting services to use our class library vs an SQL
Datasource?I think your best bet would be to wrap some web services around your DLL and
then in RS 2005, you can create an XML data source. Connect to your web
services to pull in the data.
Otherwise, you would need to go into the Macro section of RS and add a
reference to your DLL, and then create functions to expose data elements. I
think that would less maintainable...
"Guy Thornton" wrote:
> In my company, we have an extensive Business Logic Layer class library that
> is used for several development projects. This works great for re-use and
> streamlining project development. We would also like to extend this
> capability to reporting services activities within the corporation. How can
> we define a report in reporting services to use our class library vs an SQL
> Datasource?

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
>