on 2025 Jan 04 5:04 PM
I have statement to call a store procedure using python.... The store procedure executes an insert statement .
but the call seems not to do anything.....
def execute_proc(self, sql_statement):
"""
Execute a Store Procedure.
"""
try:
cursor = self.connection.cursor()
cursor.execute("SET SCHEMA HISTDBA")
cursor.callproc(sql_statement)
self.connection.commit()
cursor.close()
print(f"Executed SQL: {sql_statement}")
except Exception as err:
This the code i used to call store procedure. I am able to call the procedure from studio. I also add it the select permission to the account used to execute the python code.
print(f"Error executing SQL: {err}")
raise
Request clarification before answering.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.