none
How to Debugg SQL Assembly , which are created from C#.NET ?

    Question

  • 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 

    Monday, February 27, 2012 1:33 PM

Answers