Calling Stored Procedures
You can execute stored procedures using either the execute() or callproc() method of the connection.
Call Stored Procedures Using the Execute Method
Stored procedures can be called by issuing EXECUTE commands. The stored procedures parameters are parameterized, as in the following example:
cmd = "EXECUTE DownloadFile FileKey = ?" params = ["2016090118190831521BDB1051499BB846CA14525AB430241"] conn.execute(cmd, params)
Call Stored Procedures Using the Callproc Method
Rather than using "execute()", one can also use the callproc() method to execute the procedure. The method takes a procedure name and a list of parameters as its arguments:
cur = conn.cursor() params = ["2016090118190831521BDB1051499BB846CA14525AB430241"] cur.callproc("DownloadFile", params)