Export (0) Print
Expand All

Application.DataTypeInfoFromDataType Method

Returns the DataTypeInfo object for the specified data type. This method is not CLS-compliant.

Namespace: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

[CLSCompliantAttribute(false)] 
public:
DataTypeInfo^ DataTypeInfoFromDataType (
	DataType dt
)
/** @attribute CLSCompliantAttribute(false) */ 
public DataTypeInfo DataTypeInfoFromDataType (
	DataType dt
)
CLSCompliantAttribute(false) 
public function DataTypeInfoFromDataType (
	dt : DataType
) : DataTypeInfo

Parameters

dt

The data type.

Return Value

A DataTypeInfo object.

This method lets you get data type information for a specific data type. For example, if you pass "DT_I4" in the dt parameter, the return value is the DataTypeInfo object that contains the enumeration name of "DT_I4" and the type name of "four-byte signed integer". This information is useful for displaying the type information in a user interface or error message. For more information about data types, see Integration Services Data Types.

Notes to Callers: This method requires the addition of the Microsoft.SqlServer.Dts.Runtime.Wrapper to the project. In the C# code example, the using directive has aliased this namespace with the variable, Wrapper.

The following code example retrieves the name of the type, DT_I4.

No code example is currently available or this language may not be supported.

Sample Output:

DataType = four-byte signed integer

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

Community Additions

ADD
Show:
© 2014 Microsoft