Thankx...I'm looking to a way to get the param _values themselves.
Big picture...i'd like to devise a strategy where I can have a sproc record it's name and the values passed into it similar to what I can achieve with profiler. But I'm working with Express Edition and need to recreate this functionality.
I've found I can get the param names from within the running sproc as:
alter PROCEDURE __testing
SELECT DISTINCT 'Procedure' = OBJECT_NAME(object_id) ,'Parameter' = [name]
where OBJECT_NAME(object_id) = CAST(OBJECT_NAME(@@PROCID) as varchar)
EXECUTE dbo.__testing 'P%', 'A%';
I have a couple hunches for how I could take this to the next stage so as to retrieve the values but I doubt I'm doing something no one else has thought to do. Perhaps someone can suggest an 'already invented wheel'.