Debugging: Monitor dynamic string construction

Posted on 2005-04-21
Last Modified: 2010-03-19
I'm forced into some relatively complex dynamic string construction situation where just knowing the arugements set from the webpage isn't enough. If i were able to simply test in QA i'd just 'print mySQL' but this is ASP.NET-based and i'm depending on Profiler and I don't have enough experience with that tool to control it that well. I can see the SET commands executing but not th actual value that results.

I'm close to creating a scratch table to INSERT the generated strings before they execute but that seems ...umm...inelegant.
Question by:juststeve
    1 Comment
    LVL 28

    Accepted Solution

    Aside from what you're already thinking of, that is inserting into a table before executing it, you can also create a stored procedure that will accept as parameter your dynamic statement and insert this to a table before executing it.

    But the concept is the same, you still have to write it on a table for you to know the full statement it is executing.  I can't think of any other way.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    I recently came across an interesting Question In EE ( and was puzzled about how to achieve that using SSIS out of the box tasks, which was i…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now