vscode-sqltools
vscode-sqltools copied to clipboard
Can't see tables in Connection Explorer - get "Nothing here"
Description
Connecting to an SQLite database succeeds, however I can't see any of the tables in the CONNECTIONS explorer.
All I see is: Nothing here
I've tried with a full absolute filename, relative file name to workspace directory (with and without the ${workspaceFolder}
variable.
I've installed Node.js/npm. vscode asked me to install sqlite, which I did.
Expected behavior
A list of table names :)
Screenshots
Desktop (please complete the following information):
- SQLTools Version 0.23.0
- VSCode Version: 1.49.2
- OS: Windows 10 Pro - Microsoft Windows [Version 10.0.19041.508]
- Driver: SQLite
- Database version: SQLite 3
Additional context
Am using Python 3.7, with SQLAlchemy 1.3.19 for an application.
Can view the tables and data ok with SQLStudio 3.2.1 (though I'm having trouble delete a table and some columns in other tables due to some FK error). I don't think it is related, but I thought I'd mention it. I can still see the tables regardless.
Got the same issue.
Same versions as OP.
I think the problem is in resolving the SQLite file's location. I went into my workspace's settings and changed the sqltools.connections
object from
{
"sqltools.connections": [
{
"previewLimit": 50,
"driver": "SQLite",
"name": "Dev",
"database": "${workspaceFolder:client-backend}/src/db/dev.db.sqlite"
}
],
}
to
{
"sqltools.connections": [
{
"previewLimit": 50,
"driver": "SQLite",
"name": "Dev",
"database": "./src/db/dev.db.sqlite"
}
],
}
and then the connection worked fine.
@KerimG Thank you!!! This fixed the issue for me too -- I wonder why they use that weird notation if it doesn't work?
This fixed the issue for me too - thanks @KerimG
@KerimG Thanks a lot, I really solve this issue
@KerimG , I can confirm that this workaround works for me, but it's not a permanent solution.
@mtxr, is this easy to fix?
I think this is a problem of Windows paths. I've just found an empty "C:\c%3A\__Data\...\data\database.sqlite"
file, which I assume was created by sqltools, since it matches the file I was trying to open.
On windows, using SQLTools v0.24.0
and SQLTools SQLite v0.3.0
I can also confirm that this is an issue.
The new connection wizard wants to use the VSCode variable and it does not work with the tool.
I have reproduced the issue and prepared a fix. I believe the problem only shows on Windows.