• How to view content of a long string variable (VB6)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » How to view content of a long string variable (VB6)

    Author
    Topic
    #372766

    During run time, I need to check SQL statement which is assigned to string variable strSQL and can be 400 hundreds characters long. When use Watch Window, I can only manage to see max abt 250 characters at Value area, while the end part of the string is trimmed off but only that part is what I m interested in. Can anyone tell me how to view the full content of long string variable?

    Thanks
    David

    Viewing 2 reply threads
    Author
    Replies
    • #596805

      You can either temporarily put a statement

      MsgBox strSQL

      in the relevant place(s) in your code, or put a breakpoint there, and type the same statement into the Immediate window when the code pauses.

    • #596854

      Use Immediate window and debug.print, either within the code itself, or in the Immediate window directly.

    • #596947

      When I have very long string variables that I need to watch, I create a dummy label control or text box on a form. Then I set the label caption (or text for the text box ) equal to the string via code.

    Viewing 2 reply threads
    Reply To: How to view content of a long string variable (VB6)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: