Copied to clipboard

Flag this post as spam?

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


  • Simplicio Jison Jr. 24 posts 44 karma points
    May 07, 2010 @ 03:32
    Simplicio Jison Jr.
    0

    Update Umbraco Document via T-SQL

    Hi guys, 

    Does Any body have an idea how to update umbraco document property or content via t-SQL?

     

    thanks in advance

    simplicio

     

  • Chris Dunn 210 posts 401 karma points
    May 07, 2010 @ 04:10
  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    May 07, 2010 @ 09:24
    Hendy Racher
    0

    Hi Simplicio,

    As Chris suggests, it would be much better to use the API; when a property is changed a number of tables are updated: cmsDocument with a new row to indicate the latest version, cmsContentVersion that just stores the date of versions and cmsPropertyData that adds a new row for each property of that DocumentType (hence it stores a complete new version, rather than just changes).

    I suppose it would be possible (certainly not recommended) to update the specific row in cmsPropertyData, and then use the API to republish content (as the xml file - umbraco.config - would be need to be updated). This would skip versioning, and probably invalidate data in cmsDocument describing who and when that node was last updated.

    HTH,

    Hendy

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    May 07, 2010 @ 10:35
    Casey Neehouse
    1

    Simplico,

    Don't try to do it via TSQL.  First, the content cache is not refreshed, thus the content would only show after an app restart, or manual refresh.  Second, the versioning, and xml in the database also would take a hit.

    Best option is to load data to a table, call out to the web app to process that table.

  • Simplicio Jison Jr. 24 posts 44 karma points
    May 07, 2010 @ 12:50
    Simplicio Jison Jr.
    0

    Hi Guys,

    Thank you for your reply . Yes I first did it on Umbraco API.  but having 5000 records a day is little bit a problem when I add it on umbraco Nodes. I notice when I go to the Admin the content Page is blank(which I believe still loading the tree). So Assume umbraco load the whole tree or maybe cache the whole tree.

    So I decided to add it into Native Table at the same time update the Recent changes to umbraco document.

     

    Regards,

    Simplicio

     

     

     

     

     

     

     

     

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    May 07, 2010 @ 13:24
    Dirk De Grave
    0

    On the other hand, having 5000 nodes each day sounds a bit silly? Why are you creating sooo much nodes on a daily basis. Remember that umbraco is a cms and should be used as such. I'd really look into using custom tables and retrieve info using the available techniques such as user controls. Sounds more robust to me and won't hang your system.

     

    Just my 2cents.

     

    Cheers,

    /Dirk

     

Please Sign in or register to post replies

Write your reply to:

Draft