共用方式為


DataType Enumeration

Indicates the data type of columns in data flow components and the data flow buffer.

命名空間: Microsoft.SqlServer.Dts.Runtime.Wrapper
組件: Microsoft.SqlServer.DTSRuntimeWrap (in microsoft.sqlserver.dtsruntimewrap.dll)

語法

'宣告
Public Enumeration DataType
public enum DataType
public enum class DataType
public enum DataType
public enum DataType

Members

Member name Description
DT_BOOL A Boolean value.
DT_BYREF_BOOL A pointer to a Boolean value.
DT_BYREF_CY A pointer to a currency value. This data type is an 8-byte value with a scale of 4 and a maximum precision of 19.
DT_BYREF_DATE A pointer to a date structure that consists of year, month, date, and hour.
DT_BYREF_DBDATE A pointer to a date structure that consists of year, month, and date.
DT_BYREF_DBTIME A pointer to a time structure that consists of hour, minute, and second.
DT_BYREF_DBTIMESTAMP A pointer to a timestamp structure that consists of year, month, hour, minute, second, and fraction.
DT_BYREF_DECIMAL A pointer to an exact numeric value with a fixed precision and a fixed scale. This data type is a 12-byte value with a separate sign, a scale of 0 to 28, and a maximum precision of 29.
DT_BYREF_FILETIME A pointer to a 64-bit value that represents the number of 100-nanosecond intervals since January 1, 1601.
DT_BYREF_GUID A pointer to a GUID.
DT_BYREF_I1 A pointer to a 1-byte, signed integer.
DT_BYREF_I2 A pointer to a 2-byte, signed integer.
DT_BYREF_I4 A pointer to a 4-byte, signed integer.
DT_BYREF_I8 A pointer to an 8-byte, signed integer.
DT_BYREF_NUMERIC A pointer to an exact numeric value with a fixed precision and scale. This data type is a 16-byte value with a separate sign, a scale of 0 to 38, and a maximum precision of 38.
DT_BYREF_R4 A pointer to a single-precision floating-point value.
DT_BYREF_R8 A pointer to a double-precision floating-point value.
DT_BYREF_UI1 A pointer to a 1-byte, unsigned integer.
DT_BYREF_UI2 A pointer to a 2-byte, unsigned integer.
DT_BYREF_UI4 A pointer to a 4-byte, unsigned integer.
DT_BYREF_UI8 A pointer to an 8-byte, unsigned integer.
DT_BYTES A binary data value. The length is variable and the maximum length is 8,000 bytes.
DT_CY A currency value. This data type is an 8-byte value with a scale of 4 and a maximum precision of 19.
DT_DATE A date structure that consists of year, month, day, and hour.
DT_DBDATE A date structure that consists of year, month, and date.
DT_DBTIME A time structure that consists of hour, minute, and second.
DT_DBTIMESTAMP A timestamp structure that consists of year, month, hour, minute, second, and fraction.
DT_DECIMAL An exact numeric value with a fixed precision and a fixed scale. This data type is a 12-byte value with a separate sign, a scale of 0 to 28, and a maximum precision of 29.
DT_EMPTY A data type that does not have a value.
DT_FILETIME A 64-bit value that represents the number of 100-nanosecond intervals since January 1, 1601.
DT_GUID A globally unique identifier (GUID).
DT_I1 A 1-byte, signed integer.
DT_I2 A 2-byte, signed integer.
DT_I4 A 4-byte, signed integer.
DT_I8 An 8-byte, signed integer.
DT_IMAGE A binary value with a maximum size of 231–1 (2,147,483,647) bytes.
DT_NTEXT A Unicode character string with a maximum length of 2^30–1 (1,073,741,823) characters.
DT_NULL A data type with a value of NULL.
DT_NUMERIC An exact numeric value with a fixed precision and scale. This data type is a 16-byte value with a separate sign, a scale of 0 to 38, and a maximum precision of 38.
DT_R4 A single-precision floating-point value.
DT_R8 A double-precision floating-point value.
DT_STR A null-terminated ANSI/MBCS character string.
DT_TEXT An ANSI/MBCS character string with a maximum length of 231–1 (2,147,483,647) characters.
DT_UI1 A 1-byte, unsigned integer.
DT_UI2 A 2-byte, unsigned integer.
DT_UI4 A 4-byte, unsigned integer.
DT_UI8 An 8-byte, unsigned integer.
DT_WSTR A null-terminated Unicode character string.

備註

更新的文字:2006 年 7 月 17 日

Data types are divided into reference types and value types. Reference types point to an object of the specified type. Value types contain the actual data, not a pointer to the data.

For those data types that are value types, there are times where you need a pointer to their data, not the data itself. In the member table, the DT_BYREF* members are fields that were created to be pointers to value types.

For more information, see Mapping Data Types in the Data Flow.

ms213438.note(zh-tw,SQL.90).gif附註:
Boolean values are logical values, not numbers. Although Boolean values may be displayed as numbers in some environments, they are not stored as numbers, and various programming languages represent Boolean values as numeric values differently, as do the .NET Framework methods. For example, the conversion functions available in Visual Basic convert True to -1; however, the System.Convert.ToInt32 method in the .NET Framework converts True to +1. The Integration Services Expression Language converts True to -1. To avoid errors or unexpected results, you should not write code that relies on particular numeric values for True and False. Wherever possible, you should restrict usage of Boolean variables to the logical values for which they are designed.

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

Microsoft.SqlServer.Dts.Runtime.Wrapper Namespace