Can I clear the Results pane in code? #21923
Replies: 2 comments
-
I don't believe there's a built-in command to clear the Results pane directly from a T-SQL script running in ADS. The Results pane is managed by the user interface of the tool, rather than the T-SQL script itself. If you need to clear the Results pane frequently, you can click the "Clear Result" button. However, your specific need seems to be having each iteration's results displayed distinctly. One workaround for this is to add a PRINT or RAISERROR statement at the start of each iteration to indicate a new set of results. This would make it easier to visually separate the results of each iteration. However, Azure Data Studio is related to VS Code and features added to VS Code often end up being supported in Azure Data Studio. There is an issue raised for this feature in the VS Code repository, and it is currently in the backlog. Hopefully that helps. Jack @ Emerge |
Beta Was this translation helpful? Give feedback.
-
Thanks, Jack!
I figured that T-SQL wouldn’t be able to directly affect the ADS UI, but still hoped that there might be some kind of directive that could be put in the code (maybe as a comment) that ADS would be able to intercept and act upon.
Maybe some enterprising user (who’s a better programmer than I am) will find a way to do this in an extension?
Jim
Jim Killian | Software Developer
Sentinel Offender Services, LLC
111 Corporate Drive, Suite 125 | Ladera Ranch, CA 92694<webextlink://111%20Corporate%20Drive,%20Suite%20125%20|%20Ladera%20Ranch,%20CA%2092694/>
C| 949.239.3722
E| ***@***.******@***.***>
W| www.sentineladvantage.com<http://www.sentineladvantage.com/>
From: Emerge Digital ***@***.***>
Sent: Thursday, June 15, 2023 5:17 AM
To: microsoft/azuredatastudio ***@***.***>
Cc: Jim Killian ***@***.***>; Author ***@***.***>
Subject: Re: [microsoft/azuredatastudio] Can I clear the Results pane in code? (Discussion #21923)
*** WARNING *** This email is not from Sentinel. Do not click links or open attachments unless you recognize the sender, know the content is safe, and the email does not claim to be from Sentinel.
I don't believe there's a built-in command to clear the Results pane directly from a T-SQL script running in ADS. The Results pane is managed by the user interface of the tool, rather than the T-SQL script itself.
If you need to clear the Results pane frequently, you can click the "Clear Result" button. However, your specific need seems to be having each iteration's results displayed distinctly. One workaround for this is to add a PRINT or RAISERROR statement at the start of each iteration to indicate a new set of results. This would make it easier to visually separate the results of each iteration.
However, Azure Data Studio is related to VS Code and features added to VS Code often end up being supported in Azure Data Studio. There is an issue raised for this feature in the VS Code repository<microsoft/vscode#10121>, and it is currently in the backlog.
Hopefully that helps.
Jack @ Emerge<https://emerge.digital>
—
Reply to this email directly, view it on GitHub<#21923 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AUP4VJSKRN2JNXZW4CA7QODXLL4NTANCNFSM6AAAAAAU2U4U2Y>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
I'm running this code to check some queues on a schedule and would like to clear the Results pane before each iteration so that the current results are always in view:
The code works fine except for clearing the Results pane. I had to add the RAISERROR to get the results to show before pausing.
Is this doable?
Beta Was this translation helpful? Give feedback.
All reactions