to preface everything I am an extreme beginner. While, yes, I am looking for help with a specific issue I’m facing, I am also on here attempting to reach out to you guys to see all of your different perspectives/thought-processes on what is going on, why, and how I can better understand the larger picture so that I can figure these things out on my own with some acute problem-solving and critical-thinking going forward, and not have to completely embarrass myself with sill questions on the internet, lol.
I am building my first side project, an NFL player stat database. The environment I use is VSC, I am writing my program in python, and I use a program in conjunction called DB Browser for SQLite to better see the db I am building, etc. (not a fan of how they show up in VSC). I have some experience with this specific method of building/looking at the db, specifically for a school project last year. I had no issues then, but that was on my Chromebook.
Now, I am on a Windows PC, using all of the same programs/same processes but for whatever reason, in VSC, I am only able to code the table creations. Those appear in the database with all correct columns, in the DB app and in VSC. No issues at all. But when I went to do my first test/dummy insert of a player with a name, it does not populate into the Player table. The code runs and executes in VSC without errors, yet nothing changes. (I am not offended if someone asks me if I simply refreshed the db, so that is why I will get it out of the way and say I refreshed multiple times and the db is not changed at all).
the insert statement I am using to test
this is how the Player table is set up for now
this is after running that test insert statement and nothing changing withing VSC
In fact, I know there is an issue, because when I go into the DB Browser program to tinker with it and run the exact same SQL insert statement within their “Execute SQL” tab, I am perfectly able to add in my test/dummy insert. Yet in VSC, nothing happens. I didn’t experience this the last time I used this exact same approach (on a different system) and am wondering what is going on for VSC to execute the SQL table creation scripts but not the insert attempt.
this is me successfully using the same statement in the DB Browser program
test insert shows up in this program but not VSC
So as I said at the beginning, can you guys help me figure out what is going on and how to better understand how this is working and what could be going on?
Thank you in advance!
Alexander Criscolo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.