Jan-15-2020, 08:38 PM
Thank you Buran,
That's an interesting solution, and I will have to try it.
On my own I came up with this:
I will give your example a try.
That's an interesting solution, and I will have to try it.
On my own I came up with this:
def updateSent(msgId): cnxn = pyodbc.connect('UID='+dbUser+';PWD='+dbPassword+';DSN='+dbHost) cursor = cnxn.cursor() update_stmt = "UPDATE WKM_sms_outbound SET status = 'sent' WHERE msg_id = " + msgId cursor.execute(update_stmt) cnxn.close()However, it does not work to update the database. It's odd, because I added lines to the function to print both the msgId object, and the update_stmt objects, and those both print the correct strings... it's just as if the query isn't running at all.
I will give your example a try.