In Displaying CLR Parameter Data from SQL Books Online , Object is listed as the correct type to display sql_variant .
I created a simple SQL Server project and added the following class to it:
public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void StoredProcedure1(object param1)
{
SqlContext.Pipe.Send(param1.ToString());
}
};
Then I modified the test.sql file to implement this saved process:
DECLARE @thing sql_variant = 'hahahahaha';
EXEC dbo.StoredProcedure1 @thing
:
hahahahaha
.
( 0 ())
sp_executesql.