none
Implicit conversion from clr type to sql type RRS feed

  • Question

  • i get this msg when i alter column from clr type to sql typr

    'Implicit conversion from data type xxx to nvarchar is not allowed. Use the CONVERT function to run this query.'

     i make this function

    public

     

     

    static implicit operator SqlString...

    but it's don hel me.

    can i do Implicit conversion from clr type to sql type

    Tuesday, December 7, 2010 10:46 AM

Answers

  • SQLCLR doesn't support custom .NET operators in UDTs. The way to accomplish this is to implement ToString on the type and call it from T-SQL.

    Cheers, Bob Beauchemin, SQLskills

    • Marked as answer by mordechai.p Tuesday, December 7, 2010 9:41 PM
    Tuesday, December 7, 2010 8:32 PM
    Moderator