I believe your problem is with strange commit statements. You only need to commit when inserting or updating not entries.
cursor.execute(SQL_command, queueNumber) result_set = cursor.fetchall()
In addition, in the future when using commit, and cursor.commit and con.commit do the same thing, you will only need one.
Finally, I'm used to calling execute with the second argument as a tuple:
cursor.execute(SQL_command, (queueNumber,))
The way it works, pyodbc works, but is not a DB API standard.
Mark source share