Home Forums SQL Server 2005 T-SQL (SS2K5) How to tell if your code is executing inside sp_ExecuteSQL? RE: How to tell if your code is executing inside sp_ExecuteSQL?

  • I can't see any way of doing this directly, without using an additional param.

    But logically, within your proc, can you assume that the nesting level can either:

    1) Remain the same

    2) Decrement by one to a minimum of zero

    3) Increment by one

    ?

    If yes, maybe you can handle it by restricting the magnitude of the jumps in the nesting level using brute-force coding.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.