vscode-sqltools icon indicating copy to clipboard operation
vscode-sqltools copied to clipboard

Can't see tables in Connection Explorer - get "Nothing here"

Open BrendanSimon opened this issue 3 years ago • 7 comments

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

image

image

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.

BrendanSimon avatar Sep 25 '20 03:09 BrendanSimon

Got the same issue.

Same versions as OP.

KerimG avatar Sep 25 '20 06:09 KerimG

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 avatar Sep 25 '20 06:09 KerimG

@KerimG Thank you!!! This fixed the issue for me too -- I wonder why they use that weird notation if it doesn't work?

not-so-smart avatar Oct 16 '20 05:10 not-so-smart

This fixed the issue for me too - thanks @KerimG

dynamictulip avatar Jan 07 '21 13:01 dynamictulip

@KerimG Thanks a lot, I really solve this issue

payen-py avatar Jan 19 '21 06:01 payen-py

@KerimG , I can confirm that this workaround works for me, but it's not a permanent solution.

@mtxr, is this easy to fix?

jamesmyatt avatar Jan 29 '21 10:01 jamesmyatt

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.

jamesmyatt avatar Jan 29 '21 12:01 jamesmyatt

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.

CyberFoxar avatar Sep 09 '22 12:09 CyberFoxar

I have reproduced the issue and prepared a fix. I believe the problem only shows on Windows.

gjsjohnmurray avatar Sep 09 '22 15:09 gjsjohnmurray