locked
How to return value from stored procedure RRS feed

  • Question

  • User-1378722245 posted

    Hi There,

    I am using below Stored procedure call using Webmatix Razor helper class.  below syntax just passing parameter from code behind, How can i return output parameter ? 

    var db = Database.Open("ConnectionString");

    var SQLSP = "exec dbo.StroredProcedure @0, @1, @2, @3, @4, @5, @6";
    db.Execute(SQLSP, int.Parse(MenuID), MenuName, MenuURL, int.Parse(MenuFilterID), MenuFilterValue, int.Parse(MenuParentID), int.Parse(Request.Cookies["UserInfo"]["sSID"]));
    Json.Write("Success", Response.Output);

    Thanks in advance

    Saturday, June 11, 2016 5:31 PM

Answers

  • User379720387 posted

    var storedprocresult = db.Execute(SQLSP, int.Parse(MenuID), MenuName, MenuURL, int.Parse(MenuFilterID), MenuFilterValue, int.Parse(MenuParentID), int.Parse(Request.Cookies["UserInfo"]["sSID"]));

    Proceed as usual

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, June 12, 2016 1:18 PM

All replies