Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query Results (Preview) does not display Print messages #18863

Open
JeanBlin opened this issue Feb 26, 2025 · 1 comment
Open

Query Results (Preview) does not display Print messages #18863

JeanBlin opened this issue Feb 26, 2025 · 1 comment

Comments

@JeanBlin
Copy link

  • MSSQL Extension Version: 1.29.0
  • VSCode Version: 1.97.2 (user setup)
  • OS Version: Windows 11 Enterprise 23H2 (OS Build 22631.4751)

settings.json:

  • "mssql.objectExplorer.groupBySchema": true,
  • "mssql.enableRichExperiences": true,
  • "mssql.enableNewQueryResultFeature": true,

Steps to Reproduce:

I created a simple query to drop all the tables in a given schema and when I run this query, I first print the name of the schema and name of the table. When I run the query in Azure Data Studio, I get the desired output in the Query Results messages, but when I run the same query in teh VSCode extension, I only get Commands completed successfully.

Query ran on the same database with the same user account:
`DECLARE @schemaName NVARCHAR(128) = 'devtest';
DECLARE @SQL NVARCHAR(MAX) = '';

SELECT @SQL += 'PRINT ''Suppression de la table : ' + QUOTENAME(@schemaName) + QUOTENAME(TABLE_NAME) + '''; '
-- DROP TABLE ' + QUOTENAME(@schemaName) + '.' + QUOTENAME(TABLE_NAME) + ';'
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = @schemaName;

-- Exécuter les requêtes pour supprimer les tables
EXEC sp_executesql @SQL;`

Messages Output from Vscode:

4:10:13 PM
Started executing query at Line 1
Commands completed successfully.
Total execution time: 00:00:00.128

Messages Output from Azure Data Studio:

4:10:38 PMStarted executing query at Line 1
Suppression de la table : [devtest][main_profile]
Suppression de la table : [devtest][main_tool]
Suppression de la table : [devtest][main_question]
Suppression de la table : [devtest][whereused_filemetadata]
Suppression de la table : [devtest][django_content_type]
Suppression de la table : [devtest][auth_permission]
Suppression de la table : [devtest][auth_group]
Suppression de la table : [devtest][auth_user]
Total execution time: 00:00:00.111

Thank you for your help.

@nielsvdc
Copy link

I ran a stored procedure that is outputting progress text. The stored procedure finished but not all message were displayed. I was unable to do some sort of refresh of the pane for the messages to appear.
I saw the rest of the messages for a brief moment after I ran a new query and that query took a while to start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants