Python Forum
python call stored procedure
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python call stored procedure
#1
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)
Larz60+ write Oct-17-2022, 01:56 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

Fixed for you this time. Please use BBCode tags on future posts.
Reply


Messages In This Thread
python call stored procedure - by mg24 - Oct-17-2022, 12:29 PM
RE: python call stored procedure - by Larz60+ - Oct-17-2022, 01:54 PM
RE: python call stored procedure - by mg24 - Oct-18-2022, 02:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python script is hanging while calling a procedure in database prasanthi417 4 585 Jan-17-2024, 02:33 PM
Last Post: deanhystad
  python call stored procedure with two parameter mg24 4 1,597 Sep-27-2022, 05:02 AM
Last Post: deanhystad
  capture print statement written in Stored Procedure in SQL Server brijeshkumar_77 0 2,591 Feb-18-2020, 03:22 AM
Last Post: brijeshkumar_77
  Execute SQL Server Stored Procedure brijeshkumar_77 0 3,094 Feb-18-2020, 02:59 AM
Last Post: brijeshkumar_77
  Call pip3 from python folder build by me call pip3 from the /usr/bin Suryavarman 3 3,734 Oct-07-2019, 10:23 PM
Last Post: Suryavarman
  What do you think of this procedure to create a path to a folder atlass218 10 6,542 Sep-06-2019, 07:53 AM
Last Post: atlass218
  How to return value from a stored procedure of a MySQL database? UtiliseIT 0 2,358 Jul-22-2019, 10:14 AM
Last Post: UtiliseIT
  Add a stored procedure with variable using MySQL Connector UtiliseIT 0 2,311 May-04-2019, 12:46 PM
Last Post: UtiliseIT
  Unable to use sqlanydb to execute Sybase IQ Stored Procedure FORTITUDE 4 3,860 Sep-15-2018, 05:03 PM
Last Post: FORTITUDE
  How to call the stored values Dieselkaine 6 3,847 Jul-04-2018, 10:35 PM
Last Post: gontajones

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020