Copied to clipboard

Flag this post as spam?

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


  • dan 29 posts 53 karma points
    Dec 08, 2011 @ 04:38
    dan
    0

    Changing a property field with a stored procedure.

    Hi All,

    I am trying to update a property field using stored procedure. My idea is to take in two parameters that are also property fields and update one of the property fields with a new value.

    My overall scope is that I need to update a quantity after a paypal transaction is completed. I've been using PDT provided by paypal to retrieve a final detail of the transaction of the customer. Based on the sku and quantity purchased, I want to update the quantity. 

    Any ideas or thoughts would be great.

    Thanks

    Dan

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Dec 08, 2011 @ 06:11
    Richard Soeteman
    0

    Hi Dan,

    I would never change a property by modifying the database. You can change properties by using the Umbraco API. An example can be found at http://our.umbraco.org/wiki/reference/api-cheatsheet/modifying-document-properties

    Cheers,

    Richard

  • dan 29 posts 53 karma points
    Dec 08, 2011 @ 15:21
    dan
    0

    Thanks Richard, I think that I will try to pass the Node Id as well to make it simpler for me to update the document property.

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Dec 08, 2011 @ 15:27
    Richard Soeteman
    0

    why a stored proc and not the API? The API is meant  for these kind of opertations a stored proc might in worst case scenario corrupt your database

  • dan 29 posts 53 karma points
    Dec 08, 2011 @ 16:16
    dan
    0

    I was considering the stored procedure for performance reasons. But I don't want to mess up the database if that may be the case, so I will utilize the API.

Please Sign in or register to post replies

Write your reply to:

Draft