Python Forum

Full Version: python call stored procedure
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Team,

Need help how to call stored procedure via python.

I am using pyodbc libarary.

query = """EXEC[DBS_database].[dbo].[sp_Recon] 'Table1','database1'"""

Cursor.execute(query)  its not working. **wall** 
for row in cursor.fetchall():
	print(row)
Questions:
  1. Which DBMS are you using?
  2. Your query looks like a candidate for SQL injection attack.
Hi Team,

my stored procedure is working now. I will share the code soon.

Actually issue was in stored procedure output was not written.



Thanks
mg