• Gianluca Sartori (12/30/2010)


    As a side note, a CLR function can update data. 😉

    Hello Gianluca. Thanks for a great and thorough article :).

    This is slightly off topic, but how do you get a CLR Function to be able to alter the state of the DB? I have always seen this error:

    System.Data.SqlClient.SqlException: Invalid use of a side-effecting operator 'INSERT' within a function.

    I certainly don't think this is a good idea (to alter the state of the DB in a function), but you mention it can be done so I was curious.

    Take care,

    Solomon...

    SQL#https://SQLsharp.com/ ( SQLCLR library ofover 340 Functions and Procedures)
    Sql Quantum Lifthttps://SqlQuantumLift.com/ ( company )
    Sql Quantum Leaphttps://SqlQuantumLeap.com/ ( blog )
    Info sitesCollations     •     Module Signing     •     SQLCLR