More in this section
Forums / Deployment / Sitefinity v2.5 DB Parameter Changes

Sitefinity v2.5 DB Parameter Changes

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Jim Aderhold
    Jim Aderhold avatar
    48 posts
    29 Feb 2004
    14 Mar 2006
    Link to this post
    I have stumbled across a change in the Database class. With the addition of Oracle as a DB option, I guess there were changes made to the CreateParameter method in order to support the new DB. In the older version, you would pass in your IDbCommand, the parameter name in your sql statement with the "@" character as a prefix, and the parameter value. In the new version of the method, you must leave off the "@" character when passing in the parameter name.

    string commandText = "Select * from table where Name = @Name";
    (Database db = dbFactory.CreateDatabase())

    IDbCommand command = db.NewCommand(commandText );
    db.CreateParameter(command, "@Name", "Name"); (Old Way)
    db.CreateParameter(command, "Name", "Name");
    (New Way)

    Although this is a minor change, it can cause some serious headaches when trying to use code written in v2.0 controls and trying to insert them into your v2.5 site. I hope this can help someone from hours of frustration when their controls won't work when upgrading to v2.5.
  2. Vlad
    Vlad avatar
    498 posts
    19 Jun 2017
    15 Mar 2006
    Link to this post
    You are right, Jim. We should have mentioned this change, which we made due to the Oracle support. Thank you for pointing this out.

    Your points were updated.

    Have a nice day,
    the telerik team
2 posts, 0 answered