Getting Line Numbers for Errors Thrown in SQL Server CLR Runtime
- by fetucine53
Hi all,
I've created a CLR stored procedure that I'm running on SQL 2k5 and I'm wondering if there's any way to get line numbers for exceptions thrown by the .NET code. When an Exception is thrown, I get something along the lines of
Msg 6522, Level 16, State 1, Procedure myProcedure, Line 0
A .NET Framework error occurred during execution of user-defined routine or aggregate "myProcedure":
System.Exception: testing exception
System.Exception:
at DummyDLL.myProcedure (String dummyInput)
.
Is there some way I can load the assembly to give me specific line numbers rather than just the function in which the error was thrown? The assembly itself was compiled with a .pdb, but SQL 2k5 doesn't appear to be reading it in when I load the assembly initially.
Thanks!