SQL Server: Could not find type in the assembly

后端 未结 2 363
滥情空心
滥情空心 2020-12-23 14:02

Assume the assembly dll:

using Microsoft.SqlServer.Server;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System;
using System.Text;

namespa         


        
相关标签:
2条回答
  • 2020-12-23 14:37

    Try

    CREATE FUNCTION NormalizeString(@s nvarchar(max), 
                                    @normalizationForm nvarchar(50)) 
    RETURNS nvarchar(max)
    AS EXTERNAL NAME CLRFunctions.[CLRFunctions.T].NormalizeString
    
    0 讨论(0)
  • 2020-12-23 14:41

    I just busted my skull on this in Visual Studio 2017, building a CLR in VB. What I found out, when creating the procedure in SQL, THE EXTERNAL NAME is set as follows:

    • AssemblyName.[Assemblyname.ClassNameInVBProgram].SubroutineNameInVBProgram

    And it is Case Sensitive.

    Use Create Assembly in SQL to create the Sql Assembly

    Use Create Procedure in SQL to create the CLR SP.

    0 讨论(0)
提交回复
热议问题