Python Forum
python call stored procedure with two parameter
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python call stored procedure with two parameter
#3
cursor.fetchall() will return all responses to the "execute" as a list. For your particular need it might be valid to use curser.fetchone().

If there are multiple responses you could also use cursor.execute(sql, params) as an iterator.
for reply in cursor.execute(sql, params):
    print(reply)
This last is a lazy iterator. It retrieves replies one at a time. That can be useful for some kinds of queries.
Reply


Messages In This Thread
RE: python call stored procedure with two parameter - by deanhystad - Sep-26-2022, 09:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to capture the result set from a stored procedure? dee 5 4,969 May-25-2024, 01:03 AM
Last Post: deanhystad
  python script is hanging while calling a procedure in database prasanthi417 4 2,244 Jan-17-2024, 02:33 PM
Last Post: deanhystad
  How do I handle escape character in parameter arguments in Python? JKR 6 6,082 Sep-12-2023, 03:00 AM
Last Post: Apoed2023
  [ERROR] ParamValidationError: Parameter validation failed: Invalid type for parameter gdbengo 3 18,033 Dec-26-2022, 08:48 AM
Last Post: ibreeden
  python call stored procedure mg24 2 2,233 Oct-18-2022, 02:19 AM
Last Post: mg24
  I need my compiled Python Mac app to accept a file as a parameter Oethen 2 3,468 May-10-2020, 05:57 PM
Last Post: Oethen
  capture print statement written in Stored Procedure in SQL Server brijeshkumar_77 0 3,361 Feb-18-2020, 03:22 AM
Last Post: brijeshkumar_77
  Execute SQL Server Stored Procedure brijeshkumar_77 0 4,907 Feb-18-2020, 02:59 AM
Last Post: brijeshkumar_77
  what would you call the input for the parameter(s) of a function you have defined? rix 3 3,453 Dec-16-2019, 12:04 AM
Last Post: rix
  Python Parameter inside Json file treated as String dhiliptcs 0 2,548 Dec-10-2019, 07:28 PM
Last Post: dhiliptcs

Forum Jump:

User Panel Messages

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