Skip to content
Advertisement

Executing SQL query using python doesn’t do anything

I’m coding a tracking stock prices program. I’m trying to execute INSERT query and it executes, but doesn’t do anything.

Here’s my method in my class SQLDatabaseOperator

And here’s my sample test.

Nothing is in the database. I don’t know what to do. I’m using SQLite. This is my database.

enter image description here

Advertisement

Answer

The answear was simple – I just need to use

after executing cursor. Regards for https://stackoverflow.com/users/42346/mechanical-meat for solving my problem.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement