locked
Debugging stored procedures with temp tables RRS feed

  • Question

  • Hi All,

    I found this thread from 2009.

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/39d08574-1238-4ed4-96b2-374c0ac8871f/view-contents-of-temp-tables-when-debugging-stored-procedures?forum=vstsdb

    Is this still true?

    I would like to see the content of a table of temp table when I am debugging an sp in Visual Studio 2013 ultimate.

    Thanks

    Wednesday, May 21, 2014 11:37 AM

Answers

All replies

  • Hello,

    You might ask in the SQL Server Data Access forum.

    Karl


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})


    Wednesday, May 21, 2014 2:02 PM
  • But I am using VS 2013 debugger.

    I want to see the data from the temp table when i am debugging.

    Example:

    CREATE PROCEDURE called_procedure @par1 int,
                                      @par2 bit,
                                      ... AS
       ...
       INSERT/UPDATE/DELETE #tmp
    go
    CREATE PROCEDURE caller AS
       DECLARE ...
       CREATE TABLE #mytemp (col1 int     NOT NULL,
                             col2 char(5) NULL,
                            ...)
       ...
       EXEC called_procedure @par1, @par2 ...
       SELECT * FROM #mytemp
    go

    If i have a break point in SELECT * FROM #mytemp, I should see the query results, correct?

    Thanks


    Wednesday, May 21, 2014 5:03 PM
  • In SQL Server management studio works, why it doesn't work in VS 2013?

    Thanks

    Wednesday, May 21, 2014 6:45 PM
  • These ones may help or try Karl's suggestion.

    How to: Debug Stored Procedures

    How to debug stored procedures in Visual Studio .NET

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Thursday, May 22, 2014 1:38 AM