callproc() with parameter doesnt return resultset
I have this simple stored procedure which return resultset
CREATE PROCEDURE spGetProductList()
BEGIN
SELECT ProductName, UnitPrice, UnitsInStock FROM products;
END
When I use callproc() to call these stored procedure, it work fine
h=csr.callproc('spGetProductList')
for result in csr.stored_results():
print (result.fetchall())
But If I add a parameter to stored procedure, it doesnt work
CREATE PROCEDURE spGetProductList( qCategoryId INT)
BEGIN
SELECT ProductName, UnitPrice, UnitsInStock
FROM products
WHERE CategoryId=qCategoryId;
END
I use this code to call these stored procedure, no resultset is returned
args = (2,)
h=csr.callproc('spGetProductList', args)
for result in csr.stored_results():
print (result.fetchall())
Subject
Written By
Posted
callproc() with parameter doesnt return resultset
November 07, 2012 05:34AM
November 27, 2012 04:02AM
December 02, 2012 08:17AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.