Copied to clipboard

Flag this post as spam?

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


  • Sa 118 posts 152 karma points
    Nov 02, 2009 @ 06:08
    Sa
    0

    create parameter ?

    Hi folks.,

    while creating custom section .,if i use xml as db for storing values Instead of using sqlserver as db ..

    how to set Alias value to my xml?

    how to create parameter in xml as like in sqlserver2005 createParameter()..

     int IdReturned = Application.SqlHelper.ExecuteScalar<int>
                                ("insert into corporateCompliance(wrongWord) values(@wrongWord);select @@Identity",
                        Application.SqlHelper.CreateParameter("@wrongWord", Alias));

                _returnUrl = "plugins/editCorporateCompliance.aspx?id=" + IdReturned;

                return true;

     

     

  • Petr Snobelt 923 posts 1535 karma points
    Nov 02, 2009 @ 11:38
    Petr Snobelt
    0

    You shouldn't use create parameter. You must read your xml, check for last value, increment it, store into xml and return url based on new value

  • Sa 118 posts 152 karma points
    Nov 02, 2009 @ 11:47
    Sa
    0

     

    i got this error..

    Value cannot be null.
    Parameter name: type

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Nov 02, 2009 @ 12:13
    Dirk De Grave
    0

    As Petr says, you shouldn't be using the SqlHelper as this tends to write data to the umbraco database, and you want to store data in xml!

     

    Cheers,

    /Dirk

Please Sign in or register to post replies

Write your reply to:

Draft