March 31, 2009 at 5:56 am
I am stepping through a number of complex sprocs using visual studio 2008. there are decisions made in the sprocs based on temp tables.
Is it possible to query the data in these temp tables from visual studio while stepping through, so i know their contents?
March 31, 2009 at 8:09 am
Winston, I don't know a way to do that in Visual Studio, but if you are allowed to modify the proc, then try adding a @debugMode parameter to it. Then you can embed statements like this in the procedure:
IF @DebugMode = 'Debug'
begin
select * from #temp
end
You can also condition the final insert/update of a proc to only execute when @debugMode <> 'Debug'. It comes in very handy. When you are ready to go to production, you can comment those lines out. Or not.
When I do this, I always have the @debugMode parameter at the end of the parameters with a default value of 'OFF'. Good luck.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 31, 2009 at 8:35 am
This is already implemented in production, so i cant modify it. there are temp tables (#tablename) in teh sproc, and updates are done on tables joined to these temp tables. i need to see whats in these temp tables to see how the update is working, but currently i cant.
creating these temp tables manually is very difficult as they are modified in as many as 10 different sprocs down the chain.
Thanks anyway.
March 31, 2009 at 8:51 am
Understood. Sorry I'm no more help. Maybe someone else can help you out.
By the way, have you ever lived in Oxford, MS?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 31, 2009 at 9:02 am
Oxford, no, never lived there! Why do you ask?
March 31, 2009 at 9:10 am
I live in Oxford, and your name seemed familiar. That's all. 🙂
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply