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

SQLTools extension fails to populate Query History #1444

Open
Susja opened this issue Feb 20, 2025 · 3 comments
Open

SQLTools extension fails to populate Query History #1444

Susja opened this issue Feb 20, 2025 · 3 comments
Labels

Comments

@Susja
Copy link

Susja commented Feb 20, 2025

Describe the bug
I am using mssql and sqltools extensions in VS Code 1.97.2
When I use mssql .. after I execute any sql query .. I see that it was added to Panel 'Query History'.
When I SQLTools extension with driver 'SQLTools MSSQL/Azure+ Driver' .. Panel 'Query History' is not populating.

To Reproduce
Steps to reproduce the behavior:

  1. Go to VS Code
  2. Click on Connection for SQLTools
  3. Select any connection to database and click on icon 'New SQL file'
  4. Execute query
  5. Note that 'Query History' Panel was not populated

Expected behavior
After each SQL query execution ... Query History should be updated

Screenshots
If applicable, add screenshots to help explain your problem.

Image

Desktop (please complete the following information):

  • SQLTools Version 0.28.4
  • VS Code Version: 1.97.2
  • OS: [Windows
  • Driver:
    SQLTools MSSQL/Azure+ Driver 0.6.2
  • Database version: MS SQL 15.0.4390.2

Additional context
It has no issue when instead of SQLTools I use MSSQL extension.

@Susja Susja added the triage label Feb 20, 2025
@rojam-bocaj
Copy link

Are you sure that you properly connected the driver, i made the same mistake before

@Susja
Copy link
Author

Susja commented Feb 23, 2025

@rojam-bocaj - sorry, but what do you mean by ‘property connection'?
SQLTools working fine in all aspects except not displaying Query History. I simply connected it to driver… and that’s it.
On the other hand I found a workaround. Since I have another extension installed I.e. mssql which doesn’t have issues with History… I simply click CTRL+H or CTRL+Shift+P and could see Queries History.
Thanks for your comments

@rojam-bocaj
Copy link

  • Check Query History Settings

Open VS Code and go to Settings (Ctrl + ,).
Search for SQLTools: Query History.
Ensure Enable Query History is checked.

  • Manually Open Query History

Run SQLTools: Show History from the Command Palette (Ctrl + Shift + P).
If it doesn’t appear, restart VS Code and try again.

  • Check SQLTools Log for Errors

Open Output Panel (Ctrl + Shift + U).
Select SQLTools from the dropdown.
Look for any errors related to query history.
Check Storage Location
SQLTools stores history in a local JSON file. If this file is corrupted or missing, you might need to reset it:

Navigate to %APPDATA%\Code\User\globalStorage\mtxr.sqltools
Look for query_history.json.
If it’s missing or corrupted, try renaming it and restarting VS Code.

  • Update or Reinstall SQLTools

Run SQLTools: Update Dependencies from the Command Palette.
If the issue persists, uninstall and reinstall SQLTools.

Will any of this help what you are trying to do? I came up with this really quick so ask me any questions.

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

No branches or pull requests

2 participants