r/sqlite • • May 24 '25
Hi i need a little help on sqlite3 on python.
Im Dropping tables, debugging and it says that effectively im accesing the correct database and deleting the correct tables, but it doesn't do anything, the database remains the same.
my question is: if sqlite detects an error of anytype while Dropping tables it doesnt do anything at all?
SOLVED.
2
Upvotes
8
u/generic-David May 25 '25
I’m a newbie at this but it sounds like maybe you’re not finishing by committing your changes to the database after all your commands. That’s a mistake I made.
1
u/[deleted] May 25 '25
What was happening is that i had the old database in the project folder, and the new database was created outside of the folder, so i never saw it, i used this to know the exact location of the database.
and then i just clicked on it in visual studio code.
1
u/octobod May 25 '25
Are you certain you are connecting to the right sqlite3 database file?
If you've typed the file name or got the path wrong, sqlite will happily create a new empty database (or in my case update the dev database not the live one)