Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mike Taylor 155 posts 353 karma points
    Nov 16, 2011 @ 11:07
    Mike Taylor
    0

    Stored procedures - retrieving output parameters using SqlHelper?

    I've added a couple of tables to my Umbraco database to store "orders" and "order lines" on a website. I've added a stored procedure to the DB which adds a new order, and returns the new order ID as an output parameter.

    What's the best way to run this stored procedure and retrieve the value of the output parameter? Is it possible to do with the Umbraco SqlHelper?

    Cheers,

    Mike

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Nov 16, 2011 @ 12:00
    Jeroen Breuer
    0

    The SqlHelper is nice to use in packages so it's compatible with all Umbraco installs, but for custom work I usually use ORM. I use LLBLGen for almost all our projects.

    Jeroen

  • Mike Taylor 155 posts 353 karma points
    Nov 16, 2011 @ 12:27
    Mike Taylor
    0

    Hi Jeroen - I'll definitely take a look at that, but for the project I'm working on, it's a bit overkill - I just need a couple of extra tables and a couple of stored procedures. Do you know if SqlHelper can manager output parameters?

    Mike

  • Richard Soeteman 4047 posts 12900 karma points MVP 2x
    Nov 16, 2011 @ 12:47
    Richard Soeteman
    0

    Hi Mike,

    I don't think (pretty sure) this is not built in for the the SqlHelper. What you can do is use the normal SqlConnection/SqlCommand  objects then you can use output parameters.

    Cheers,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft