Hi, I'm trying to fill a datareader with records returned from a stored procedure. I'm using the code pasted below, and it works only on stored procedures with no parameters. If the sp expects a parameter, despite beeing provided, this code returns an error saying that I did not provide a parameter :
stored procedures & Umbraco
Hi, I'm trying to fill a datareader with records returned from a stored procedure. I'm using the code pasted below, and it works only on stored procedures with no parameters. If the sp expects a parameter, despite beeing provided, this code returns an error saying that I did not provide a parameter :
string sp_name = "sp_SelectAllProducts";
IParameter p3 = umbraco.BusinessLogic.Application.SqlHelper.CreateParameter("@intParent", 5);
IRecordsReader reader = umbraco.BusinessLogic.Application.SqlHelper.ExecuteReader(sp_name,p3);
Any sugestions what could be the problem?
Thanks for your help!
Problem is that internally, the method looks like this:
yeah thanks, this solved the problem:
string sql = "sp_SelectAllProductst @intparent";
is working on a reply...