Copied to clipboard

Flag this post as spam?

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


  • Mark Wemekamp 73 posts 385 karma points
    Sep 02, 2015 @ 10:12
    Mark Wemekamp
    0

    Change databasetype for datatype

    Hi all!

    For a datatype I'm experiencing some problems due to it's databasetype which is set to nvarchar instead of Ntext

    Is there a way to change the databasetype without using code or changing the database? Also there's already a lot of data in the database, so it would be nice to have some sort of backward compatibility.

    Thanks in advance!

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Sep 02, 2015 @ 13:32
    Douglas Robar
    0

    Hi, Mark, and welcome to OUR!

    Which datatype are you using that's giving you trouble? I've not seen such a problem but before exploring what might be possible it would be helpful to understand better what you're doing in your site and what's not working as it ought.

    Thanks!

    cheers,
    doug.

  • Mark Wemekamp 73 posts 385 karma points
    Sep 02, 2015 @ 13:58
    Mark Wemekamp
    101

    Hi Doug and thank you!

    I did a bit of research and it turned out the datatype is custom and was developed by one of my colleagues. It was added to the Umbraco through code.

    new DataTypeDefinition(-1, "Umbraco.MultipleTextstring")
    {
        Name = "MultipleValues",
        DatabaseType = DataTypeDatabaseType.Nvarchar
    };
    

    I've fixed the problem by changing the code (to prevent future problems) and manually updating the dbType field of the corresponding cmsDataType row.

    I don't know if this is the best way to fix this problem, but I think it did the trick.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Sep 02, 2015 @ 14:02
    Douglas Robar
    0

    Sounds like a great answer! Thanks for sharing for the benefit of the next person :)

    Oh, and be sure to mark your answer as the solution.

    cheers, doug.

Please Sign in or register to post replies

Write your reply to:

Draft