How to Debugg SQL Assembly , which are created from C#.NET ?
-
Monday, February 27, 2012 1:33 PM
Hi,
i have created c#.NET assembly and deployed on SQL server, here the source i have written in c#.net
[Microsoft.SqlServer.Server.SqlFunction] public static SqlString Test(SqlString sWebUrl, SqlString Method, SqlString ParameterString, SqlString StringUsername, SqlString StringPassword) { string sResponse = ""; ///other CODE here return new SqlString(sResponse); }
This created assembly we are calling from SQL function as defined below
CREATE FUNCTION [dbo].[fn_Test](@sWebUrl [nvarchar](max), @Method [nvarchar](max), @ParameterString [nvarchar](max), @StringUsername [nvarchar](max), @StringPassword [nvarchar](max)) RETURNS [nvarchar](max) WITH EXECUTE AS CALLER AS EXTERNAL NAME [Test_Assembly].[UserDefinedFunctions].[Test]
Finally this function are calling from SQL Stored Procedure , but when we are trying to execute the stored procedure assembly did not throws any error but it want return expected output.
So that my confusion is that HOW CAN I DEBUG/TRACE the assembly ????
Thanks,
Atul
All Replies
-
Monday, February 27, 2012 8:29 PMModerator
Hi Atul,Have a look at http://msdn.microsoft.com/en-us/library/sc65sadd.aspx for starters.Cheers,Bob- Marked As Answer by KJian_ Monday, March 05, 2012 6:40 AM

