Question

Connect and execute Microsoft SQL on Python Shutdown Script

  • 27 June 2018
  • 1 reply
  • 6 views

Badge +1

Has anyone successfully executed an insert\\delete SQL statement to a SQL database via Python in the Shutdown Script?


1 reply

Userlevel 4

Have a look at using the pyodbc module, see also this discussion on StackOverflow: https://stackoverflow.com/a/33787509

The SQL Server writers also have a parameter you can set, containing a SQL command to execute at the end:

Reply