Skip to main content
Question

Connect and execute Microsoft SQL on Python Shutdown Script

  • June 27, 2018
  • 1 reply
  • 22 views

Forum|alt.badge.img+1

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

david_r
Celebrity
  • 8391 replies
  • June 28, 2018

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: