Export (0) Print
Expand All

SqlParameter.UdtTypeName Property

Gets or sets a string that represents a user-defined type as a parameter.

Namespace: System.Data.SqlClient
Assembly: System.Data (in system.data.dll)

public string UdtTypeName { get; set; }
/** @property */
public String get_UdtTypeName ()

/** @property */
public void set_UdtTypeName (String value)

public function get UdtTypeName () : String

public function set UdtTypeName (value : String)

Not applicable.

Property Value

A string that represents the fully qualified name of a user-defined type.

The code in this example creates a SqlParameter object to insert data into a user-defined type column in a table. The UdtTypeName specifies the fully qualified name of the user-defined type column in the TestPoint table.

private static void AddSqlParameter(SqlCommand command,
    string udtName, string paramValue)
{
    SqlParameter parameter = new SqlParameter(
        "@Point", SqlDbType.Udt);
    parameter.SqlDbType = SqlDbType.Udt;
    parameter.UdtTypeName = udtName;
    parameter.Value = paramValue;
    command.Parameters.Add(parameter);
}

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft