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

Extension syntax error

Open ThomasKFitzgerald opened this issue 1 year ago • 4 comments

Terminal window:

PS C:\DevOps\Python\Learning\Databases> sqlite3 SQLite version 3.46.1 2024-08-13 09:16:08 (UTF-16 console I/O) Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> .open test.db sqlite> CREATE TABLE investments (coin_id TEXT, currency TEXT, anount REAL); sqlite> .tables investments sqlite> .headers on sqlite> .mode column sqlite> pragma table_info('investments'); cid name type notnull dflt_value pk


0 coin_id TEXT 0 0 1 currency TEXT 0 0 2 anount REAL 0 0 sqlite> INSERT INTO investments VALUES ('bitcoin', 1.0, 'usd'); sqlite> SELECT * FROM investments; coin_id currency anount


bitcoin 1.0 usd sqlite> .exit PS C:\DevOps\Python\Learning\Databases>

This is a new DB.

image

When clicking open database this is the error:
" [9:58:20 AM][vscode-sqlite][INFO] Activating extension vscode-sqlite v0.14.1... [9:58:20 AM][vscode-sqlite][INFO] Extension activated. [10:03:05 AM][vscode-sqlite][ERROR] Failed to open database 'c:\DevOps\Python\Learning\Databases\test.db': Parse error near line 4: no such column: "table" - should this be a string literal in single-quotes? aster WHERE (type="table" OR type="view")
error here ---^ "

ThomasKFitzgerald avatar Sep 10 '24 09:09 ThomasKFitzgerald

I have the same issue

Chisrra avatar Sep 11 '24 23:09 Chisrra

Currently having the same issue, I'm on Mac (Silicon) and can't open any .sqlite file despite being able to open them in other apps or extensions. I get the exact error about parson in line 4

sergio-urbina avatar Sep 16 '24 11:09 sergio-urbina

Same issue - VSCode version is: Version: 1.93.1 Commit: 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40 Date: 2024-09-11T17:20:05.685Z Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.93.1 Chrome/124.0.6367.243 Electron/30.4.0 Safari/537.36

TeacupTerrapin avatar Sep 28 '24 00:09 TeacupTerrapin

Same here on Arch Linux. Tried changing the sqlite3 executable path to the one returned by

where sqlite3

(which was: /usr/bin/sqlite3),

but it didn't fix the issue.

wem1c avatar Dec 06 '24 13:12 wem1c

Same error. Has to do with double-quoted literal strings. These are supposed to be single-quoted (I think v3.4 and newer). See here for a fix: https://github.com/AlexCovizzi/vscode-sqlite/pull/241

As an aside, does anybody have a recommendation for a similar extension that is being currently maintained?

Goose66 avatar Jan 13 '25 21:01 Goose66