SqlParameter.TypeName Property
Gets or sets the type name for a table-valued parameter.
Assembly: System.Data (in System.Data.dll)
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Table-valued parameter with types in non-dbo schemas
For table-valued parameters that use user-defined table types in specific schemas, you can reference the type by setting TypeName to [schema].[typename].
Example:
T-SQL:
CREATE SCHEMA example
GO
CREATE TYPE example.MyTableType AS TABLE (col1 int /* etc. */)
C#:
SqlParameter p = new SqlParameter();
// ... snip ...
p.TypeName = "[example].[MyTableType]";
Example:
T-SQL:
CREATE SCHEMA example
GO
CREATE TYPE example.MyTableType AS TABLE (col1 int /* etc. */)
C#:
SqlParameter p = new SqlParameter();
// ... snip ...
p.TypeName = "[example].[MyTableType]";
