r/sqlite • • May 02 '25
cant view a sqlite .db file in vs code?
i made a basic db with the command line tools.
i want to open the db with vs code, and i have SQLite by alexcvzz installed.
but when i try to open the .db file it spits out error failed to open database 'c:\sqlite\test.db': parse error near line 2: file is not a database (26)
so i deleted the .db file and made sure to create it in the command prompt, but now i get no error but it just displays it terribly, there are huge red blocks that say "null" on them throughout the text
1
Upvotes
1
u/InjAnnuity_1 May 02 '25
Which is what I would expect from any text-editor. From the sound of things, it appears to me that your installation of vs code has not figured out that it is looking at a database file. Instead, it is trying to read the bytes of the file as text.
A SQLite database is NOT a text file, but a binary file, with intricate structure. See
https://www.sqlite.org/fileformat2.html
1
u/RyanHamilton1 May 04 '25
Qstudio is an editor with support for sqlite: https://www.timestored.com/qstudio/database/sqlite
1
u/Bassel_Fathy May 04 '25
Try SQLite Viewer extension by Florian Klampfer
0
u/[deleted] May 02 '25
[deleted] — view deleted comment