Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 CLR Stored Procedure

Author  Topic 

yadhu_cse
Constraint Violating Yak Guru

252 Posts

Posted - 2012-01-16 : 01:00:31
Hi,

i have a class called employee, now i want to create CLR Stored procedure by passing class name. can any one tel me how to create it.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-01-16 : 01:11:28
see an example here

http://aspnetlibrary.com/articledetails.aspx?article=Using-CLR-to-access-.NET-functions-in-SQL-Server

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

yadhu_cse
Constraint Violating Yak Guru

252 Posts

Posted - 2012-01-16 : 01:26:38
ya have seen example.. i am able to create Sp from dataset but i am not able to create from employee calss
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-01-16 : 02:01:12
hmm...you're trying to call class method isnt it?
would you mind posting code you used?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-01-16 : 08:15:03
As the example that Visakh pointed to and the examples on this MSDN page shows (http://msdn.microsoft.com/en-us/library/ms254956(v=vs.80).aspx) you don't associate a .NET class with a CLR stored procedure. You associate a class METHOD with a stored procedure. Within the method you can refer to other class methods, properties and members.
Go to Top of Page
   

- Advertisement -