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 2008 Forums
 Transact-SQL (2008)
 Return value from CLR Assembly

Author  Topic 

mickyc1
Starting Member

1 Post

Posted - 2012-10-17 : 10:10:40
I have a C# assembly that returns a string. I created an SP to call this assembly and it works. But when i try to assign the return value to a variable it does not work. Here is my SP:
  ALTER PROCEDURE GetDemoPass (@newpass nvarchar(max), @suppliedSalt nvarchar(max))  


AS EXTERNAL NAME Salt.[Salt2.SQLSalt].setEncPassword


go


when i do an exec on the stored procedure the value is returned but when i try to do something like this:

EXEC @salt = dbo.[GetDemoPass] N'Test', N'Test' 


The value isn't held in @salt. Is there something simple i am missing?

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2012-10-18 : 09:40:17
does your method setEncPassword require parameters? It looks like you are calling it in your external assembly without params.








How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Go to Top of Page
   

- Advertisement -