[SqlProcedure()]
public static void GetCustInfo(SqlString PhoneNo, out SqlString CustInfo)
{
// code...
}
This is how I try to create the function:
CREATE FUNCTION [dbo].[GetCustInfo] (@PhoneNo nvarchar(50))
RETURNS nvarchar(max) WITH EXECUTE AS CALLER
AS EXTERNAL NAME CustFromPhone.[ManagedCodeAndSQLServer.BaseFunctionClass].GetCustInfo
and this is the error:
CREATE FUNCTION failed because T-SQL and CLR types for return value do not match.