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

Created on 25 Sep 2020  路  3Comments  路  Source: mtxr/vscode-sqltools

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.

triage

Most helpful comment

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.

All 3 comments

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?

Was this page helpful?
0 / 5 - 0 ratings