SQL Server CLR Parameter Types
-
A quick question about the mapping between CLR types and their TSQL ones. From what I can see within the CLR you have SQLString and SQLChars which are nvarchar(4000) and nvarchar(max)...what if the callee expects to pass you a varchar(5)? Can you tell the CLR the length it should expect? Or would you have to specifically code this check?
-
A quick question about the mapping between CLR types and their TSQL ones. From what I can see within the CLR you have SQLString and SQLChars which are nvarchar(4000) and nvarchar(max)...what if the callee expects to pass you a varchar(5)? Can you tell the CLR the length it should expect? Or would you have to specifically code this check?
I wouldn't bother -- the engine will figure it out. And deal with an Exception if one is thrown.