I have a simple function, written in VB.NET and have added the assembly to SQL Server 2008 R2 and am trying to create a user-defined function out of it. The error I am getting is:
CREATE FUNCTION for "ufn_Factorial2" failed because T-SQL and CLR types for return value do not match.
I have done a lot of research and found several, different, mappings (which is confusing in itself) and none of the pairings seem to work. Here are the VB code and the T-SQL statement;
Does anybody have suggestions on how I can match up the data types correctly?
asked Oct 20 '11 at 11:32 AM in Default
Are you sure, you are referencing correct assembly and correct function in the external name? I mean function with right data types? As from your code, the data types are correct. I mean
Remember, that if you have changed the data types in the assembly and recompiled it, you have to redeploy the assembly into the database as the binary representation of the assembly is physically stored directly in the db.Anyway, isn't
answered Oct 20 '11 at 11:58 AM